Regexp#inspect doesn't match MRI's output
Reported by Ezra Zygmuntowicz | February 4th, 2008 @ 12:40 AM | in 1.0 preview
In MRI:
>> Regexp.new("/fo/foo/")
=> /\/fo\/foo\//
IN rbx:
irb(main):004:0> Regexp.new("/fo/foo/")
=> //fo/foo//
I played around some trying to fix this issue but I broke the inspect_regexp_spec.rb trying.
This is the last hurdle to running merb-core on rubinius.
Comments and changes to this ticket
-
zimbatm February 4th, 2008 @ 02:37 PM
- → State changed from new to open
Weird. in MRI:
irb(main):001:0> Regexp.new("\/") == /\// => false irb(main):002:0> Regexp.new("\/").inspect == /\//.inspect => true -
zimbatm February 4th, 2008 @ 02:49 PM
Both MRI and Rubinius store the same sources but reverse-escaping is not done on #inspect in rubinius.
irb(main):008:0> Regexp.new("\/").source => "/" irb(main):009:0> /\//.source => "\\/"in Rubinius:
-
-
Brian Ford February 5th, 2008 @ 01:59 AM
- → State changed from open to resolved
Committed in dfb941d. Thanks!
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
