$_ is not nil after IO.gets after EOF
-------------------------------------

                 Key: JRUBY-2528
                 URL: http://jira.codehaus.org/browse/JRUBY-2528
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.1
         Environment: OS: Windows Vista Ultimate Service Pack 1
java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing) 
            Reporter: Gabor Kolok
            Assignee: Thomas E Enebo
         Attachments: main.rb

The following test fails on JRuby, and not on MR:

require 'stringio'
require 'test/unit'


class TestIOGets < Test::Unit::TestCase

  def test_dollar_nil
    io = StringIO.new( "line")
    io.gets 
    io.gets
    assert_nil($_)
  end
end

  1) Failure:
test_dollar_nil(TestIOGets)
<nil> expected but was
<"line">.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to