diff options
author | Benoit Daloze <eregontp@gmail.com> | 2021-06-02 14:34:07 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2021-06-02 14:34:07 +0200 |
commit | 22e2a6a999b958efe5d84d9c7314e450fda82254 (patch) | |
tree | b2dc946cf2fe2c250d0583675e548c67dca3e71a /spec/ruby/core/io/sysseek_spec.rb | |
parent | a4fbc7e2884ba694278adea3b32ddb8c2ac10efe (diff) |
Update to ruby/spec@a0b7d0d
Diffstat (limited to 'spec/ruby/core/io/sysseek_spec.rb')
-rw-r--r-- | spec/ruby/core/io/sysseek_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/ruby/core/io/sysseek_spec.rb b/spec/ruby/core/io/sysseek_spec.rb index df894734e3..e631939bce 100644 --- a/spec/ruby/core/io/sysseek_spec.rb +++ b/spec/ruby/core/io/sysseek_spec.rb @@ -26,6 +26,11 @@ describe "IO#sysseek" do -> { @io.sysseek(-5, IO::SEEK_CUR) }.should raise_error(IOError) end + it "seeks normally even when called immediately after a buffered IO#read" do + @io.read(15) + @io.sysseek(-5, IO::SEEK_CUR).should == 10 + end + it "moves the read position relative to the start with SEEK_SET" do @io.sysseek(43, IO::SEEK_SET) @io.readline.should == "Aquí está la línea tres.\n" |