ruby/ruby-2.6.1-Fix-rubyspec-to-follow-IO-ungetbyte-fix.patch
2019-01-31 12:42:56 +01:00

44 lines
1.5 KiB
Diff

From b228a084aa200c82deaf02ee3cfa91943171f166 Mon Sep 17 00:00:00 2001
From: naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Wed, 30 Jan 2019 13:09:26 +0000
Subject: [PATCH] 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
---
spec/ruby/core/io/ungetbyte_spec.rb | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/spec/ruby/core/io/ungetbyte_spec.rb b/spec/ruby/core/io/ungetbyte_spec.rb
index 2e51fb02987c..f5f9a11be154 100644
--- a/spec/ruby/core/io/ungetbyte_spec.rb
+++ b/spec/ruby/core/io/ungetbyte_spec.rb
@@ -49,7 +49,7 @@
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 @@
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