Project

General

Profile

Bug #1639

YAML.load fails on some Regexps

Added by vtron (viktor tron) over 10 years ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
ruby -v:
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
[ruby-core:23864]

Description

=begin
lib/yaml/rubytypes.rb

Regexp.new('',0,'u')
=> //u
YAML.dump(Regexp.new('',0,'u'))
=> "--- !ruby/regexp //u\n"
YAML.load(YAML.dump(Regexp.new('',0,'u')))
YAML::TypeError: Invalid Regular expression: "//u"
from /usr/lib/ruby/1.8/yaml/rubytypes.rb:275:in yaml_new'
from /usr/lib/ruby/1.8/yaml.rb:133:in
transfer'
from /usr/lib/ruby/1.8/yaml.rb:133:in node_import'
from /usr/lib/ruby/1.8/yaml.rb:133:in
load'
from /usr/lib/ruby/1.8/yaml.rb:133:in `load'
from (irb):30
from :0
=end

History

#1

Updated by jeremyevans0 (Jeremy Evans) about 2 months ago

  • Status changed from Open to Closed
  • Description updated (diff)

Also available in: Atom PDF