R
Robert Feldt
Hi,
I assume it's been a long day and I'm missing something but line 3 below
sure looks like a bug to me:
$ irb
irb(main):001:0> "a".sub("a", "+")
=> "+"
irb(main):002:0> "a".sub("a", "\\*")
=> "\\*"
irb(main):003:0> "a".sub("a", "\\+")
=> ""
irb(main):004:0> exit
robert_feldt@it002473 /tmp/ruby
$ ruby -v
ruby 1.9.0 (2004-04-04) [i386-cygwin]
The same behavior is seen in 1.8.1 i386-cygwin and 1.8.1 i386-mswin32
and for gsub so it's been in there for some time.
What am I missing?
Regards,
Robert Feldt
I assume it's been a long day and I'm missing something but line 3 below
sure looks like a bug to me:
$ irb
irb(main):001:0> "a".sub("a", "+")
=> "+"
irb(main):002:0> "a".sub("a", "\\*")
=> "\\*"
irb(main):003:0> "a".sub("a", "\\+")
=> ""
irb(main):004:0> exit
robert_feldt@it002473 /tmp/ruby
$ ruby -v
ruby 1.9.0 (2004-04-04) [i386-cygwin]
The same behavior is seen in 1.8.1 i386-cygwin and 1.8.1 i386-mswin32
and for gsub so it's been in there for some time.
What am I missing?
Regards,
Robert Feldt