diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-20 20:38:57 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-20 20:38:57 +0000 |
commit | 6204e0804b24f1675b49d5880da014411bcfb831 (patch) | |
tree | ce6c00bf078fc416936ca3cdc972b9b3c1c78dae /spec/ruby/core/io | |
parent | 58573c33e4720315ed27491e31dcc22892e1ce95 (diff) |
Update to ruby/spec@35a9fba
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66888 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/ruby/core/io')
-rw-r--r-- | spec/ruby/core/io/ungetbyte_spec.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/ruby/core/io/ungetbyte_spec.rb b/spec/ruby/core/io/ungetbyte_spec.rb index 2e51fb0298..f5f9a11be1 100644 --- a/spec/ruby/core/io/ungetbyte_spec.rb +++ b/spec/ruby/core/io/ungetbyte_spec.rb @@ -49,7 +49,7 @@ describe "IO#ungetbyte" do end end - ruby_version_is '2.6'...'2.7' do + ruby_version_is '2.6'...'2.6.1' do it "is an RangeError if the integer is not in 8bit" do for i in [4095, 0x4f7574206f6620636861722072616e6765] do lambda { @io.ungetbyte(i) }.should raise_error(RangeError) @@ -57,10 +57,11 @@ describe "IO#ungetbyte" do end end - ruby_version_is '2.7' do + ruby_version_is '2.6.1' do it "never raises RangeError" do - for i in [4095, 0x4f7574206f6620636861722072616e6765] do - lambda { @io.ungetbyte(i) }.should_not raise_error + for i in [4095, 0x4f7574206f6620636861722072616e67ff] do + @io.ungetbyte(i).should be_nil + @io.getbyte.should == 255 end end end |