T
Tasos Laskos
Hi guys,
I'm using "ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux]"
and just noticed a possible bug in Regex.escape() while using it with
gsub()
This:
--------
pp Regexp.escape( '.rb' )
--------
yields:
--------
"\\.rb"
--------
while it should be "\.rb".
Regexp.new( '.rb' ) or Regexp.new( '\.rb' ) work though, they replaces
the ".rb" string as expected.
Yes I know that "Regexp.new( '.rb' )" works incidentally but I'm just
mentioning it.
I'm using "ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux]"
and just noticed a possible bug in Regex.escape() while using it with
gsub()
This:
--------
pp Regexp.escape( '.rb' )
--------
yields:
--------
"\\.rb"
--------
while it should be "\.rb".
Regexp.new( '.rb' ) or Regexp.new( '\.rb' ) work though, they replaces
the ".rb" string as expected.
Yes I know that "Regexp.new( '.rb' )" works incidentally but I'm just
mentioning it.