Skip to content

Commit e73d3c6

Browse files
committed
Port upstream r66952 (r66888)
* Fix rubyspec to follow IO#ungetbyte's fix Merge CRuby r66824 With fixing actual spec and the version the change applied. ruby/ruby@b228a08
1 parent 9772948 commit e73d3c6

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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

debian/patches/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
0006-Port-to-kfreebsd-amd64.patch
77
0007-Fix-tests-when-ruby-program-suffix-is-used-without-r.patch
88
0008-Unset-SOURCE_DATE_EPOCH-on-Rubygems-test-cases.patch
9+
0009-merge-revision-s-66888-Backport-15460.patch

0 commit comments

Comments
 (0)