Skip to content

Commit fc400a3

Browse files
committed
EOFError is defined under Object, not IO
1 parent 1a6aa8d commit fc400a3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/truffle/stringio.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ def read(length=nil, buffer=nil)
430430
end
431431

432432
def readchar
433-
raise IO::EOFError, 'end of file reached' if eof?
433+
raise EOFError, 'end of file reached' if eof?
434434
getc
435435
end
436436

@@ -440,7 +440,7 @@ def readbyte
440440

441441
def readline(sep=$/, limit=Undefined)
442442
check_readable
443-
raise IO::EOFError, 'end of file reached' if eof?
443+
raise EOFError, 'end of file reached' if eof?
444444

445445
Truffle::IOOperations.set_last_line(getline(true, sep, limit), Truffle.invoke_primitive(:caller_binding))
446446
end
@@ -527,7 +527,7 @@ def sysread(length=nil, buffer='')
527527

528528
if str.nil?
529529
buffer.clear
530-
raise IO::EOFError, 'end of file reached'
530+
raise EOFError, 'end of file reached'
531531
end
532532

533533
str

0 commit comments

Comments
 (0)