[MacRuby] #952: Should set got string to $_ when calls StringIO#gets #readline.
MacRuby
ruby-noreply at macosforge.org
Mon Oct 11 04:27:04 PDT 2010
#952: Should set got string to $_ when calls StringIO#gets #readline.
----------------------------------+-----------------------------------------
Reporter: watson1978@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: minor | Milestone:
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
Test Script:
{{{
#!ruby
require 'stringio'
str = StringIO.new("hello world!")
s = str.gets
p s
p $_
str = StringIO.new("1234")
s = str.readline
p s
p $_
}}}
Result:
{{{
$ ruby19 -v test_stringio.rb
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]
"hello world!"
"hello world!"
"1234"
"1234"
$ macruby test_stringio.rb
"hello world!"
nil
"1234"
nil
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/952>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list