diff options
author | Benoit Daloze <eregontp@gmail.com> | 2022-04-25 14:53:54 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2022-04-25 14:53:54 +0200 |
commit | 45cf4f218728a15eb36d14a6c9912086525f5e3f (patch) | |
tree | 2aa93fadcb904c226f722dde47827098b87a9846 /spec/ruby/core/io/ungetbyte_spec.rb | |
parent | 6ae81d49b52563a6720d666a6118ffa6e484f398 (diff) | |
download | ruby-45cf4f218728a15eb36d14a6c9912086525f5e3f.tar.gz |
Update to ruby/spec@3affe1e
Diffstat (limited to 'spec/ruby/core/io/ungetbyte_spec.rb')
-rw-r--r-- | spec/ruby/core/io/ungetbyte_spec.rb | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/spec/ruby/core/io/ungetbyte_spec.rb b/spec/ruby/core/io/ungetbyte_spec.rb index 776707205a..716743a6af 100644 --- a/spec/ruby/core/io/ungetbyte_spec.rb +++ b/spec/ruby/core/io/ungetbyte_spec.rb @@ -36,20 +36,10 @@ describe "IO#ungetbyte" do @io.getbyte.should == 97 end - ruby_version_is ''...'2.6.1' do - it "is an RangeError if the integer is not in 8bit" do - for i in [4095, 0x4f7574206f6620636861722072616e6765] do - -> { @io.ungetbyte(i) }.should raise_error(RangeError) - end - end - end - - ruby_version_is '2.6.1' do - it "never raises RangeError" do - for i in [4095, 0x4f7574206f6620636861722072616e67ff] do - @io.ungetbyte(i).should be_nil - @io.getbyte.should == 255 - end + it "never raises RangeError" do + for i in [4095, 0x4f7574206f6620636861722072616e67ff] do + @io.ungetbyte(i).should be_nil + @io.getbyte.should == 255 end end |