Skip to content

Commit b4d5ebc

Browse files
nobumatzbot
authored andcommitted
[ruby/stringio] Fix SEGV at eof? on null StringIO
ruby/stringio@29b9133332
1 parent 31f2d89 commit b4d5ebc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/stringio/test_stringio.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ def test_null
7070
assert_nil io.getc
7171
end
7272

73+
def test_pread_eof
74+
io = StringIO.new(nil)
75+
assert_predicate io, :eof?
76+
end
77+
7378
def test_pread_null
7479
io = StringIO.new(nil)
7580
assert_raise(EOFError) { io.pread(1, 0) }

0 commit comments

Comments
 (0)