diff options
Diffstat (limited to 'ext/psych')
-rw-r--r-- | ext/psych/lib/psych/visitors/to_ruby.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/psych/lib/psych/visitors/to_ruby.rb b/ext/psych/lib/psych/visitors/to_ruby.rb index 5bd33b4d7d..b68abb6919 100644 --- a/ext/psych/lib/psych/visitors/to_ruby.rb +++ b/ext/psych/lib/psych/visitors/to_ruby.rb @@ -32,7 +32,7 @@ module Psych return result if @domain_types.empty? || !target.tag key = target.tag.sub(/^[!\/]*/, '').sub(/(,\d+)\//, '\1:') - key = "tag:#{key}" unless key =~ /^(tag:|x-private)/ + key = "tag:#{key}" unless key =~ /^(?:tag:|x-private)/ if @domain_types.key? key value, block = @domain_types[key] @@ -89,7 +89,7 @@ module Psych Float(@ss.tokenize(o.value)) when "!ruby/regexp" klass = class_loader.regexp - o.value =~ /^\/(.*)\/([mixn]*)$/ + o.value =~ /^\/(.*)\/([mixn]*)$/m source = $1 options = 0 lang = nil |