diff options
author | Rob Steward <bobert_1234567890@hotmail.com> | 2015-03-30 18:47:24 -0400 |
---|---|---|
committer | Rob Steward <bobert_1234567890@hotmail.com> | 2015-03-30 18:47:24 -0400 |
commit | a9c56c5ece54deaa05d7d2a584eaafb1891993c1 (patch) | |
tree | 149b88beba1443cfcfcc56013b7bfc230e44307c /lib | |
parent | 24ff7855ca2f62e59fc951fa30b225f42369c2a2 (diff) | |
download | psych-a9c56c5ece54deaa05d7d2a584eaafb1891993c1.zip |
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 |