psych 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +6 -0
- data/ext/psych/parser.c +4 -3
- data/lib/psych.rb +1 -1
- data/test/psych/test_encoding.rb +1 -1
- metadata +8 -8
data/CHANGELOG.rdoc
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
Sat Apr 7 02:07:00 2012 Aaron Patterson <aaron@tenderlovemaking.com>
|
2
|
+
|
3
|
+
* ext/psych/parser.c: fall back to any encoding if the external
|
4
|
+
encoding is wrong. [ruby-core:44163]
|
5
|
+
* test/psych/test_encoding.rb: fix test
|
6
|
+
|
1
7
|
Fri Mar 9 06:29:22 2012 Aaron Patterson <aaron@tenderlovemaking.com>
|
2
8
|
|
3
9
|
* ext/psych/lib/psych.rb (load, parse): stop parsing or loading after
|
data/ext/psych/parser.c
CHANGED
@@ -146,10 +146,11 @@ static VALUE transcode_io(VALUE src, int * parser_encoding)
|
|
146
146
|
return src;
|
147
147
|
}
|
148
148
|
|
149
|
-
|
150
|
-
|
149
|
+
/* If the external encoding is something we don't know how to handle,
|
150
|
+
* fall back to YAML_ANY_ENCODING. */
|
151
|
+
*parser_encoding = YAML_ANY_ENCODING;
|
151
152
|
|
152
|
-
return
|
153
|
+
return src;
|
153
154
|
}
|
154
155
|
|
155
156
|
#endif
|
data/lib/psych.rb
CHANGED
data/test/psych/test_encoding.rb
CHANGED
@@ -57,7 +57,7 @@ module Psych
|
|
57
57
|
# If the external encoding isn't utf8, utf16le, or utf16be, we cannot
|
58
58
|
# process the file.
|
59
59
|
File.open(t.path, 'r', :encoding => 'SHIFT_JIS') do |f|
|
60
|
-
assert_raises
|
60
|
+
assert_raises Psych::SyntaxError do
|
61
61
|
Psych.load(f)
|
62
62
|
end
|
63
63
|
end
|
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: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-04-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake-compiler
|
16
|
-
requirement: &
|
16
|
+
requirement: &70210793685840 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.4.1
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70210793685840
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rdoc
|
27
|
-
requirement: &
|
27
|
+
requirement: &70210793685400 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '3.10'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70210793685400
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: hoe
|
38
|
-
requirement: &
|
38
|
+
requirement: &70210793709520 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '2.13'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70210793709520
|
47
47
|
description: ! 'Psych is a YAML parser and emitter. Psych leverages libyaml[http://pyyaml.org/wiki/LibYAML]
|
48
48
|
|
49
49
|
for its YAML parsing and emitting capabilities. In addition to wrapping
|