psych 5.3.1-java → 5.4.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/ext/psych/psych_parser.c +14 -3
- data/lib/psych/versions.rb +1 -1
- data/lib/psych.jar +0 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e62755a6f6b0b7f7eebe2651fbb2b1c81538e2bcbc1d010fe58574b7ede21b84
|
|
4
|
+
data.tar.gz: 39bc8e482405345038582fb548d6164bdcea116424786c508be42f25753567e8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d2fcda255f004e0fa53379d5192acf1e77b0cb5f8af431495acda6291fd818a2089569d4e840aca9920ad3a70d92d2eb4af2fe4e98e957410a08f4c3b94ab990
|
|
7
|
+
data.tar.gz: dc0f517aa6da6eaf7fe614229069d01c34edc3b29da6056e613a66f7cd33034599e1b3d761d4c1ea879d1c1e8ad92df5f5489ef7b242f6fff56723d6b6cc3259
|
data/README.md
CHANGED
|
@@ -26,8 +26,8 @@ Psych.dump("foo") # => "--- foo\n...\n"
|
|
|
26
26
|
|
|
27
27
|
## Installation
|
|
28
28
|
|
|
29
|
-
Psych has been included with MRI since 1.9.2, and
|
|
30
|
-
|
|
29
|
+
Psych has been included with MRI since 1.9.2, and has been the default YAML parser
|
|
30
|
+
since 1.9.3.
|
|
31
31
|
|
|
32
32
|
If you want a newer gem release of Psych, you can use RubyGems:
|
|
33
33
|
|
data/ext/psych/psych_parser.c
CHANGED
|
@@ -32,9 +32,20 @@ static int io_reader(void * data, unsigned char *buf, size_t size, size_t *read)
|
|
|
32
32
|
*read = 0;
|
|
33
33
|
|
|
34
34
|
if(! NIL_P(string)) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
char * str = StringValuePtr(string);
|
|
36
|
+
size_t len = (size_t)RSTRING_LEN(string);
|
|
37
|
+
|
|
38
|
+
/* IO#read(size) is documented to return at most `size` bytes, but a
|
|
39
|
+
* misbehaving IO-like object may return more. Clamp the copy to the
|
|
40
|
+
* buffer libyaml gave us to avoid writing past its end, rounding down
|
|
41
|
+
* to a character boundary so a multibyte character is never split. */
|
|
42
|
+
if(len > size) {
|
|
43
|
+
rb_encoding * enc = rb_enc_get(string);
|
|
44
|
+
len = (size_t)(rb_enc_left_char_head(str, str + size, str + len, enc) - str);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
*read = len;
|
|
48
|
+
memcpy(buf, str, len);
|
|
38
49
|
}
|
|
39
50
|
|
|
40
51
|
return 1;
|
data/lib/psych/versions.rb
CHANGED
data/lib/psych.jar
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: psych
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.
|
|
4
|
+
version: 5.4.0
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Aaron Patterson
|
|
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
133
133
|
version: '0'
|
|
134
134
|
requirements:
|
|
135
135
|
- jar org.snakeyaml:snakeyaml-engine, 2.10
|
|
136
|
-
rubygems_version: 4.0.
|
|
136
|
+
rubygems_version: 4.0.3
|
|
137
137
|
specification_version: 4
|
|
138
138
|
summary: Psych is a YAML parser and emitter
|
|
139
139
|
test_files: []
|