[前][次][番号順一覧][スレッド一覧]

ruby-changes:54735

From: naruse <ko1@a...>
Date: Wed, 30 Jan 2019 22:09:33 +0900 (JST)
Subject: [ruby-changes:54735] naruse:r66952 (ruby_2_6): merge revision(s) 66888: [Backport #15460]

naruse	2019-01-30 22:09:26 +0900 (Wed, 30 Jan 2019)

  New Revision: 66952

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66952

  Log:
    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.

  Modified files:
    branches/ruby_2_6/spec/ruby/core/io/ungetbyte_spec.rb
Index: ruby_2_6/spec/ruby/core/io/ungetbyte_spec.rb
===================================================================
--- ruby_2_6/spec/ruby/core/io/ungetbyte_spec.rb	(revision 66951)
+++ ruby_2_6/spec/ruby/core/io/ungetbyte_spec.rb	(revision 66952)
@@ -49,7 +49,7 @@ describe "IO#ungetbyte" do https://github.com/ruby/ruby/blob/trunk/ruby_2_6/spec/ruby/core/io/ungetbyte_spec.rb#L49
     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 https://github.com/ruby/ruby/blob/trunk/ruby_2_6/spec/ruby/core/io/ungetbyte_spec.rb#L57
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]