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

ruby-changes:70687

From: Nobuyoshi <ko1@a...>
Date: Sat, 1 Jan 2022 18:56:03 +0900 (JST)
Subject: [ruby-changes:70687] 84891bffe8 (master): Remove unnecessary Random::DEFAULT expectations

https://git.ruby-lang.org/ruby.git/commit/?id=84891bffe8

From 84891bffe8e68e12a7881d2bbae0db8267035e8a Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 27 Nov 2020 21:42:46 +0900
Subject: Remove unnecessary Random::DEFAULT expectations

The respond_to expectation just suffice as duck-typing.
---
 spec/ruby/core/random/default_spec.rb | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/spec/ruby/core/random/default_spec.rb b/spec/ruby/core/random/default_spec.rb
index db444d203d5..90d3b1720dc 100644
--- a/spec/ruby/core/random/default_spec.rb
+++ b/spec/ruby/core/random/default_spec.rb
@@ -7,28 +7,6 @@ describe "Random::DEFAULT" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/random/default_spec.rb#L7
     end
   end
 
-  ruby_version_is ''...'3.0' do
-    it "returns a Random instance" do
-      suppress_warning do
-        Random::DEFAULT.should be_an_instance_of(Random)
-      end
-    end
-  end
-
-  ruby_version_is '3.0' do
-    it "refers to the Random class" do
-      suppress_warning do
-        Random::DEFAULT.should.equal?(Random)
-      end
-    end
-
-    it "is deprecated" do
-      -> {
-        Random::DEFAULT.should.equal?(Random)
-      }.should complain(/constant Random::DEFAULT is deprecated/)
-    end
-  end
-
   it "changes seed on reboot" do
     seed1 = ruby_exe('p Random::DEFAULT.seed', options: '--disable-gems')
     seed2 = ruby_exe('p Random::DEFAULT.seed', options: '--disable-gems')
-- 
cgit v1.2.1


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

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