U
Uwe Lammers
Hi,
I am trying to replace the last character of a string with
another character:
x = "{Hello {hello}}"
x.sub!(/\}$/, "]")
puts x
With Ruby 1.8.5 (on Windows) this gives (as expected)
{Hello {hello}]
With Ruby 1.8.1 (on Linux) I get (surprisingly)
{Hello {hello}}
Who knows what is going on? Can't believe a fundamental bug like
this was still in 1.8.1 ...
Cheers
Uwe
I am trying to replace the last character of a string with
another character:
x = "{Hello {hello}}"
x.sub!(/\}$/, "]")
puts x
With Ruby 1.8.5 (on Windows) this gives (as expected)
{Hello {hello}]
With Ruby 1.8.1 (on Linux) I get (surprisingly)
{Hello {hello}}
Who knows what is going on? Can't believe a fundamental bug like
this was still in 1.8.1 ...
Cheers
Uwe