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

ruby-changes:62975

From: Benoit <ko1@a...>
Date: Wed, 16 Sep 2020 04:56:24 +0900 (JST)
Subject: [ruby-changes:62975] 1af0319fc8 (master): 2.8 -> 3.0 in specs

https://git.ruby-lang.org/ruby.git/commit/?id=1af0319fc8

From 1af0319fc88688bc5dd5e49eecdb8b534ead9991 Mon Sep 17 00:00:00 2001
From: Benoit Daloze <eregontp@g...>
Date: Tue, 15 Sep 2020 21:54:31 +0200
Subject: 2.8 -> 3.0 in specs


diff --git a/spec/ruby/core/binding/eval_spec.rb b/spec/ruby/core/binding/eval_spec.rb
index 224bce4..b36bec7 100644
--- a/spec/ruby/core/binding/eval_spec.rb
+++ b/spec/ruby/core/binding/eval_spec.rb
@@ -23,7 +23,7 @@ describe "Binding#eval" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/binding/eval_spec.rb#L23
     bind2.local_variables.should == []
   end
 
-  ruby_version_is ""..."2.8" do
+  ruby_version_is ""..."3.0" do
     it "inherits __LINE__ from the enclosing scope" do
       obj = BindingSpecs::Demo.new(1)
       bind = obj.get_binding
@@ -50,7 +50,7 @@ describe "Binding#eval" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/binding/eval_spec.rb#L50
     end
   end
 
-  ruby_version_is "2.8" do
+  ruby_version_is "3.0" do
     it "starts with line 1 if single argument is given" do
       obj = BindingSpecs::Demo.new(1)
       bind = obj.get_binding
@@ -89,7 +89,7 @@ describe "Binding#eval" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/binding/eval_spec.rb#L89
     bind.eval("#foo\n__LINE__", "(test)", 88).should == 89
   end
 
-  ruby_version_is ""..."2.8" do
+  ruby_version_is ""..."3.0" do
     it "inherits __FILE__ from the enclosing scope" do
       obj = BindingSpecs::Demo.new(1)
       bind = obj.get_binding
@@ -97,7 +97,7 @@ describe "Binding#eval" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/binding/eval_spec.rb#L97
     end
   end
 
-  ruby_version_is "2.8" do
+  ruby_version_is "3.0" do
     it "Uses (eval) as __FILE__ if single argument given" do
       obj = BindingSpecs::Demo.new(1)
       bind = obj.get_binding
diff --git a/spec/ruby/core/env/delete_spec.rb b/spec/ruby/core/env/delete_spec.rb
index 36a1f26..5e7891f 100644
--- a/spec/ruby/core/env/delete_spec.rb
+++ b/spec/ruby/core/env/delete_spec.rb
@@ -30,7 +30,7 @@ describe "ENV.delete" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/env/delete_spec.rb#L30
     ScratchPad.recorded.should == "foo"
   end
 
-  ruby_version_is "2.8" do
+  ruby_version_is "3.0" do
     it "returns the result of given block if the named environment variable does not exist" do
       ENV.delete("foo")
       ENV.delete("foo") { |name| "bar" }.should == "bar"
diff --git a/spec/ruby/core/exception/no_method_error_spec.rb b/spec/ruby/core/exception/no_method_error_spec.rb
index b7ee543..570ffc4 100644
--- a/spec/ruby/core/exception/no_method_error_spec.rb
+++ b/spec/ruby/core/exception/no_method_error_spec.rb
@@ -104,7 +104,7 @@ describe "NoMethodError#message" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/exception/no_method_error_spec.rb#L104
     end
   end
 
-  ruby_version_is "2.8" do
+  ruby_version_is "3.0" do
     it "uses #name to display the receiver if it is a class or a module" do
       klass = Class.new { def self.name; "MyClass"; end }
       begin
diff --git a/spec/ruby/core/hash/shared/each.rb b/spec/ruby/core/hash/shared/each.rb
index 5e88a35..e0c0a94 100644
--- a/spec/ruby/core/hash/shared/each.rb
+++ b/spec/ruby/core/hash/shared/each.rb
@@ -21,7 +21,7 @@ describe :hash_each, shared: true do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/hash/shared/each.rb#L21
     ary.sort.should == ["a", "b", "c"]
   end
 
-  ruby_version_is ""..."2.8" do
+  ruby_version_is ""..."3.0" do
     it "yields 2 values and not an Array of 2 elements when given a callable of arity 2" do
       obj = Object.new
       def obj.foo(key, value)
@@ -38,7 +38,7 @@ describe :hash_each, shared: true do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/hash/shared/each.rb#L38
     end
   end
 
-  ruby_version_is "2.8" do
+  ruby_version_is "3.0" do
     it "yields an Array of 2 elements when given a callable of arity 2" do
       obj = Object.new
       def obj.foo(key, value)
diff --git a/spec/ruby/core/hash/to_proc_spec.rb b/spec/ruby/core/hash/to_proc_spec.rb
index 73c96bd..8f5d21b 100644
--- a/spec/ruby/core/hash/to_proc_spec.rb
+++ b/spec/ruby/core/hash/to_proc_spec.rb
@@ -19,13 +19,13 @@ describe "Hash#to_proc" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/hash/to_proc_spec.rb#L19
       @proc = @hash.to_proc
     end
 
-    ruby_version_is ""..."2.8" do
+    ruby_version_is ""..."3.0" do
       it "is not a lambda" do
         @proc.should_not.lambda?
       end
     end
 
-    ruby_version_is "2.8" do
+    ruby_version_is "3.0" do
       it "is a lambda" do
         @proc.should.lambda?
       end
diff --git a/spec/ruby/core/io/shared/new.rb b/spec/ruby/core/io/shared/new.rb
index 87f3001..75c5320 100644
--- a/spec/ruby/core/io/shared/new.rb
+++ b/spec/ruby/core/io/shared/new.rb
@@ -197,7 +197,7 @@ describe :io_new, shared: true do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/io/shared/new.rb#L197
     @io.internal_encoding.to_s.should == 'IBM866'
   end
 
-  ruby_version_is ''...'2.8' do
+  ruby_version_is ''...'3.0' do
     it "accepts nil options" do
       @io = suppress_keyword_warning do
         IO.send(@method, @fd, 'w', nil)
@@ -206,7 +206,7 @@ describe :io_new, shared: true do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/io/shared/new.rb#L206
     end
   end
 
-  ruby_version_is '2.8' do
+  ruby_version_is '3.0' do
     it "raises ArgumentError for nil options" do
       -> {
         IO.send(@method, @fd, 'w', nil)
@@ -382,7 +382,7 @@ describe :io_new_errors, shared: true do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/io/shared/new.rb#L382
     }.should raise_error(ArgumentError)
   end
 
-  ruby_version_is ''...'2.8' do
+  ruby_version_is ''...'3.0' do
     it "raises TypeError if passed a hash for mode and nil for options" do
       -> {
         suppress_keyword_warning do
@@ -392,7 +392,7 @@ describe :io_new_errors, shared: true do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/io/shared/new.rb#L392
     end
   end
 
-  ruby_version_is '2.8' do
+  ruby_version_is '3.0' do
     it "raises ArgumentError if passed a hash for mode and nil for options" do
       -> {
         @io = IO.send(@method, @fd, {mode: 'w'}, nil)
diff --git a/spec/ruby/core/io/ungetc_spec.rb b/spec/ruby/core/io/ungetc_spec.rb
index dc31c37..a05d80e 100644
--- a/spec/ruby/core/io/ungetc_spec.rb
+++ b/spec/ruby/core/io/ungetc_spec.rb
@@ -103,7 +103,7 @@ describe "IO#ungetc" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/io/ungetc_spec.rb#L103
     -> { @io.sysread(1) }.should raise_error(IOError)
   end
 
-  ruby_version_is "0"..."2.8" do
+  ruby_version_is "0"..."3.0" do
     it "does not affect the stream and returns nil when passed nil" do
       @io.getc.should == ?V
       @io.ungetc(nil)
@@ -111,7 +111,7 @@ describe "IO#ungetc" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/io/ungetc_spec.rb#L111
     end
   end
 
-  ruby_version_is "2.8" do
+  ruby_version_is "3.0" do
     it "raises TypeError if passed nil" do
       @io.getc.should == ?V
       proc{@io.ungetc(nil)}.should raise_error(TypeError)
diff --git a/spec/ruby/core/kernel/__dir___spec.rb b/spec/ruby/core/kernel/__dir___spec.rb
index 0686b31..324792a 100644
--- a/spec/ruby/core/kernel/__dir___spec.rb
+++ b/spec/ruby/core/kernel/__dir___spec.rb
@@ -19,7 +19,7 @@ describe "Kernel#__dir__" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/kernel/__dir___spec.rb#L19
     end
   end
 
-  ruby_version_is ""..."2.8" do
+  ruby_version_is ""..."3.0" do
     context "when used in eval with top level binding" do
       it "returns the real name of the directory containing the currently-executing file" do
         eval("__dir__", binding).should == File.realpath(File.dirname(__FILE__))
@@ -27,7 +27,7 @@ describe "Kernel#__dir__" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/kernel/__dir___spec.rb#L27
     end
   end
 
-  ruby_version_is "2.8" do
+  ruby_version_is "3.0" do
     context "when used in eval with top level binding" do
       it "returns nil" do
         eval("__dir__", binding).should == nil
diff --git a/spec/ruby/core/kernel/clone_spec.rb b/spec/ruby/core/kernel/clone_spec.rb
index 6aeb57f..c18af4a 100644
--- a/spec/ruby/core/kernel/clone_spec.rb
+++ b/spec/ruby/core/kernel/clone_spec.rb
@@ -37,7 +37,7 @@ describe "Kernel#clone" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/kernel/clone_spec.rb#L37
     o3.should.frozen?
   end
 
-  ruby_version_is '2.8' do
+  ruby_version_is '3.0' do
     it 'takes an freeze: true option to frozen copy' do
       @obj.clone(freeze: true).should.frozen?
       @obj.freeze
diff --git a/spec/ruby/core/kernel/eval_spec.rb b/spec/ruby/core/kernel/eval_spec.rb
index 783009a..c53e51e 100644
--- a/spec/ruby/core/kernel/eval_spec.rb
+++ b/spec/ruby/core/kernel/eval_spec.rb
@@ -159,7 +159,7 @@ describe "Kernel#eval" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/kernel/eval_spec.rb#L159
     end
   end
 
-  ruby_version_is ""..."2.8" do
+  ruby_version_is ""..."3.0" do
     it "uses the filename of the binding if none is provided" do
       eval("__FILE__").should == "(eval)"
       suppress_warning {eval("__FILE__", binding)}.should == __FILE__
@@ -170,7 +170,7 @@ describe "Kernel#eval" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/kernel/eval_spec.rb#L170
     end
   end
 
-  ruby_version_is "2.8" do
+  ruby_version_is "3.0" do
     it "uses (eval) filename if none is provided" do
       eval("__FILE__").should == "(eval)"
       eval("__FILE__", binding).should == "(eval)"
diff --git a/spec/ruby/core/kernel/iterator_spec.rb b/spec/ruby/core/kernel/iterator_spec.rb
index a2811dc..3fe8317 100644
--- a/spec/ruby/core/kernel/iterator_spec.rb
+++ b/spec/ruby/core/kernel/iterator_spec.rb
@@ -1,7 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/kernel/iterator_spec.rb#L1
 require_relative '../../spec_helper'
 require_relative 'fixtures/classes'
 
-ruby_version_is ""..."2.8" do
+ruby_version_i (... truncated)

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

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