diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-02 22:05:15 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-02 22:05:15 +0000 |
commit | cc6b1b3c8d4f7d617c0870c05c501903fc7fd00b (patch) | |
tree | fa5fe5006e47bcb1b240f91b6bc61f91e2e308f8 /ext/psych | |
parent | 3722e3a29aedcdd78ad07e3ed643a78b61ef345a (diff) | |
download | ruby-cc6b1b3c8d4f7d617c0870c05c501903fc7fd00b.tar.gz |
* ext/psych/lib/psych/visitors/to_ruby.rb: ARG_ENCODING_NONE regular
expressions can round trip. [ruby-core:34969]
* test/psych/test_yaml.rb: test for ARG_ENCODING_NONE regex
* ext/sych/lib/syck/rubytypes.rb: ARG_ENCODING_NONE regular
expressions can round trip.
* test/syck/test_yaml.rb: test for ARG_ENCODING_NONE regex
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych')
-rw-r--r-- | ext/psych/lib/psych/visitors/to_ruby.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/psych/lib/psych/visitors/to_ruby.rb b/ext/psych/lib/psych/visitors/to_ruby.rb index 7f0ddff96c..a68c8e698e 100644 --- a/ext/psych/lib/psych/visitors/to_ruby.rb +++ b/ext/psych/lib/psych/visitors/to_ruby.rb @@ -60,7 +60,7 @@ module Psych when "tag:yaml.org,2002:float", "!float" Float(@ss.tokenize(o.value)) when "!ruby/regexp" - o.value =~ /^\/(.*)\/([mix]*)$/ + o.value =~ /^\/(.*)\/([mixn]*)$/ source = $1 options = 0 lang = nil @@ -69,6 +69,9 @@ module Psych when 'x' then options |= Regexp::EXTENDED when 'i' then options |= Regexp::IGNORECASE when 'm' then options |= Regexp::MULTILINE + + # FIXME: there is no constant for ARG_ENCODING_NONE + when 'n' then options |= 32 else lang = option end end |