io.rb: @buf should be empty on EOF; #4983, #5389

This commit is contained in:
Yukihiro "Matz" Matsumoto
2021-04-10 19:03:02 +09:00
parent bf455fd582
commit 5342b5cfef
-2
View File
@@ -295,8 +295,6 @@ class IO
begin
readchar
rescue EOFError
c = @buf[0]
@buf[0,1]="" if c
nil
end
end