mirror of
https://github.com/ruby/ruby.git
synced 2025-09-19 02:23:59 +02:00
* io.c (rb_io_getline_1): enables limit even if rs is given.
[ruby-core:22434] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9594c893f7
commit
ac9d09ba3c
3 changed files with 24 additions and 16 deletions
|
@ -102,8 +102,9 @@ class TestIO < Test::Unit::TestCase
|
|||
def test_gets_limit_extra_arg
|
||||
with_pipe {|r, w|
|
||||
r, w = IO.pipe
|
||||
w << "0123456789"
|
||||
w << "0123456789\n0123456789"
|
||||
w.close
|
||||
assert_equal("0123456789\n0", r.gets(nil, 12))
|
||||
assert_raise(TypeError) { r.gets(3,nil) }
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue