diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-04-29 12:07:14 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-04-29 12:07:14 -0700 |
commit | 07c95f862b7cedfae0706aa9aa32bf627673f151 (patch) | |
tree | 37e740ff09740aafddc959546630fafe8dec7f65 /lib | |
parent | 22589e504eb32388b23dd9c22ed7e95cd11c845a (diff) | |
parent | e1d7f705da01349b93420cd7f54576949d694a69 (diff) | |
download | psych-07c95f862b7cedfae0706aa9aa32bf627673f151.zip |
Merge branch 'master' into jruby
* master:
add test
don't assume any tag starting with 'str' is a string
Diffstat (limited to 'lib')
-rw-r--r-- | lib/psych/visitors/to_ruby.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/psych/visitors/to_ruby.rb b/lib/psych/visitors/to_ruby.rb index b68abb6..ea3ab1c 100644 --- a/lib/psych/visitors/to_ruby.rb +++ b/lib/psych/visitors/to_ruby.rb @@ -61,7 +61,7 @@ module Psych case o.tag when '!binary', 'tag:yaml.org,2002:binary' o.value.unpack('m').first - when /^!(?:str|ruby\/string)(?::(.*))?/, 'tag:yaml.org,2002:str' + when /^!(?:str|ruby\/string)(?::(.*))?$/, 'tag:yaml.org,2002:str' klass = resolve_class($1) if klass klass.allocate.replace o.value @@ -208,7 +208,7 @@ module Psych obj end - when /^!(?:str|ruby\/string)(?::(.*))?/, 'tag:yaml.org,2002:str' + when /^!(?:str|ruby\/string)(?::(.*))?$/, 'tag:yaml.org,2002:str' klass = resolve_class($1) members = {} string = nil |