diff options
Diffstat (limited to 'ext/psych/lib/psych')
-rw-r--r-- | ext/psych/lib/psych/versions.rb | 3 | ||||
-rw-r--r-- | ext/psych/lib/psych/visitors/to_ruby.rb | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/ext/psych/lib/psych/versions.rb b/ext/psych/lib/psych/versions.rb new file mode 100644 index 0000000000..530d310f44 --- /dev/null +++ b/ext/psych/lib/psych/versions.rb @@ -0,0 +1,3 @@ +module Psych + DEFAULT_SNAKEYAML_VERSION = '1.14'.freeze +end diff --git a/ext/psych/lib/psych/visitors/to_ruby.rb b/ext/psych/lib/psych/visitors/to_ruby.rb index b68abb6919..ea3ab1c479 100644 --- a/ext/psych/lib/psych/visitors/to_ruby.rb +++ b/ext/psych/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 |