summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Steward <bobert_1234567890@hotmail.com>2015-03-30 18:47:24 -0400
committerRob Steward <bobert_1234567890@hotmail.com>2015-03-30 18:47:24 -0400
commita9c56c5ece54deaa05d7d2a584eaafb1891993c1 (patch)
tree149b88beba1443cfcfcc56013b7bfc230e44307c /lib
parent24ff7855ca2f62e59fc951fa30b225f42369c2a2 (diff)
downloadpsych-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.rb4
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