diff options
Diffstat (limited to 'spec/ruby/core/io/sysread_spec.rb')
-rw-r--r-- | spec/ruby/core/io/sysread_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/ruby/core/io/sysread_spec.rb b/spec/ruby/core/io/sysread_spec.rb index 024200efea..8201ad47ca 100644 --- a/spec/ruby/core/io/sysread_spec.rb +++ b/spec/ruby/core/io/sysread_spec.rb @@ -50,6 +50,11 @@ describe "IO#sysread on a file" do @file.sysread(5).should == "56789" end + it "raises an error when called after buffered reads" do + @file.readline + -> { @file.sysread(5) }.should raise_error(IOError) + end + it "reads normally even when called immediately after a buffered IO#read" do @file.read(15) @file.sysread(5).should == "56789" |