|
| 1 | +From: naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> |
| 2 | +Date: Wed, 30 Jan 2019 13:09:26 +0000 |
| 3 | +Subject: merge revision(s) 66888: [Backport #15460] |
| 4 | + |
| 5 | +* Fix rubyspec to follow IO#ungetbyte's fix |
| 6 | + Merge CRuby r66824 |
| 7 | + With fixing actual spec and the version the change applied. |
| 8 | + |
| 9 | +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@66952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
| 10 | +--- |
| 11 | + spec/ruby/core/io/ungetbyte_spec.rb | 9 +++++---- |
| 12 | + 1 file changed, 5 insertions(+), 4 deletions(-) |
| 13 | + |
| 14 | +diff --git a/spec/ruby/core/io/ungetbyte_spec.rb b/spec/ruby/core/io/ungetbyte_spec.rb |
| 15 | +index 2e51fb0..f5f9a11 100644 |
| 16 | +--- a/spec/ruby/core/io/ungetbyte_spec.rb |
| 17 | ++++ b/spec/ruby/core/io/ungetbyte_spec.rb |
| 18 | +@@ -49,7 +49,7 @@ |
| 19 | + end |
| 20 | + end |
| 21 | + |
| 22 | +- ruby_version_is '2.6'...'2.7' do |
| 23 | ++ ruby_version_is '2.6'...'2.6.1' do |
| 24 | + it "is an RangeError if the integer is not in 8bit" do |
| 25 | + for i in [4095, 0x4f7574206f6620636861722072616e6765] do |
| 26 | + lambda { @io.ungetbyte(i) }.should raise_error(RangeError) |
| 27 | +@@ -57,10 +57,11 @@ |
| 28 | + end |
| 29 | + end |
| 30 | + |
| 31 | +- ruby_version_is '2.7' do |
| 32 | ++ ruby_version_is '2.6.1' do |
| 33 | + it "never raises RangeError" do |
| 34 | +- for i in [4095, 0x4f7574206f6620636861722072616e6765] do |
| 35 | +- lambda { @io.ungetbyte(i) }.should_not raise_error |
| 36 | ++ for i in [4095, 0x4f7574206f6620636861722072616e67ff] do |
| 37 | ++ @io.ungetbyte(i).should be_nil |
| 38 | ++ @io.getbyte.should == 255 |
| 39 | + end |
| 40 | + end |
| 41 | + end |
0 commit comments