Project

General

Profile

This project is closed and read-only.

Actions

Bug #1639

closed

YAML.load fails on some Regexps

Bug #1639: YAML.load fails on some Regexps

Added by vtron (viktor tron) over 17 years ago. Updated about 7 years ago.

Status:
Closed
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

Updated by jeremyevans0 (Jeremy Evans) about 7 years ago Actions #1

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

Also available in: PDF Atom