berkesokhan / rubydotnetcompiler

Automatically exported from code.google.com/p/rubydotnetcompiler
1 stars 0 forks source link

Kernel gsub bug #74

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The "while/until" test in test.rb is only passing because of an existing 
bug. 

The 'redo' part of the test is not getting executed because the 'if $_ != 
line' evaluates to false (i.e. $_ and 'line' contain the same text). This 
is because 'line' was previously set to $_ AND THE gsub(/vt100/, 'VT100') 
DOES NOT BREAK THE LINK. 

Whilst is understandable behaviour, in MRI we end up with $_ as "VT100" 
but 'line' stays at "vt100" so the 'if' is taken as intended.

The reason the test passed is that there is a gsub bug (see issue 73) so 
the gsub(/vt100/, 'VT100') is actually putting 'V' into $_, not 'VT100'. 
This is not caught as a fail in lines 550 and 551.

What version of the product are you using? On what operating system?
- latest svn 9th Jan 2008

Original issue reported on code.google.com by djl.rif...@googlemail.com on 9 Jan 2008 at 12:06

GoogleCodeExporter commented 9 years ago
Fixed in source

Original comment by djl.rif...@googlemail.com on 23 Mar 2008 at 5:01