summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-30 13:09:26 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-30 13:09:26 +0000
commitb228a084aa200c82deaf02ee3cfa91943171f166 (patch)
tree92306d71571f4c81cbf5935d23fa18c690c42219 /spec
parent0a9410cea1186fadfc346c66b56d90401419bbda (diff)
merge revision(s) 66888: [Backport #15460]
* Fix rubyspec to follow IO#ungetbyte's fix Merge CRuby r66824 With fixing actual spec and the version the change applied. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@66952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec')
-rw-r--r--spec/ruby/core/io/ungetbyte_spec.rb9
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