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

parent bf455fd5
...@@ -295,8 +295,6 @@ class IO ...@@ -295,8 +295,6 @@ class IO
begin begin
readchar readchar
rescue EOFError rescue EOFError
c = @buf[0]
@buf[0,1]="" if c
nil nil
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment