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

ruby-changes:73326

From: Benoit <ko1@a...>
Date: Tue, 30 Aug 2022 01:21:29 +0900 (JST)
Subject: [ruby-changes:73326] 1315c5aad9 (master): Update to ruby/spec@b8a8240

https://git.ruby-lang.org/ruby.git/commit/?id=1315c5aad9

From 1315c5aad9d31a91e494657d98f61c9d6f65d8b1 Mon Sep 17 00:00:00 2001
From: Benoit Daloze <eregontp@g...>
Date: Mon, 29 Aug 2022 18:18:23 +0200
Subject: Update to ruby/spec@b8a8240

---
 spec/ruby/core/dir/shared/chroot.rb        | 2 +-
 spec/ruby/core/env/shared/update.rb        | 7 +++----
 spec/ruby/library/datetime/to_time_spec.rb | 3 ++-
 spec/ruby/library/time/to_datetime_spec.rb | 3 ++-
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/spec/ruby/core/dir/shared/chroot.rb b/spec/ruby/core/dir/shared/chroot.rb
index b14a433670..7c668c0fbb 100644
--- a/spec/ruby/core/dir/shared/chroot.rb
+++ b/spec/ruby/core/dir/shared/chroot.rb
@@ -3,7 +3,7 @@ describe :dir_chroot_as_root, shared: true do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/dir/shared/chroot.rb#L3
     DirSpecs.create_mock_dirs
 
     @real_root = "../" * (File.dirname(__FILE__).count('/') - 1)
-    @ref_dir = File.join("/", Dir.new('/').entries.first)
+    @ref_dir = File.join("/", File.basename(Dir["/*"].first))
   end
 
   after :all do
diff --git a/spec/ruby/core/env/shared/update.rb b/spec/ruby/core/env/shared/update.rb
index 3101f9c561..7d4799955b 100644
--- a/spec/ruby/core/env/shared/update.rb
+++ b/spec/ruby/core/env/shared/update.rb
@@ -17,10 +17,9 @@ describe :env_update, shared: true do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/env/shared/update.rb#L17
 
   ruby_version_is "3.2" do
     it "adds the multiple parameter hashes to ENV, returning ENV" do
-      ENV.send(@method, {"foo" => "0", "bar" => "1"}, {"baz" => "2"}).should equal(ENV)
-      ENV["foo"].should == "0"
-      ENV["bar"].should == "1"
-      ENV["baz"].should == "2"
+      ENV.send(@method, {"foo" => "multi1"}, {"bar" => "multi2"}).should equal(ENV)
+      ENV["foo"].should == "multi1"
+      ENV["bar"].should == "multi2"
     end
   end
 
diff --git a/spec/ruby/library/datetime/to_time_spec.rb b/spec/ruby/library/datetime/to_time_spec.rb
index 88a7aaa739..95eca864da 100644
--- a/spec/ruby/library/datetime/to_time_spec.rb
+++ b/spec/ruby/library/datetime/to_time_spec.rb
@@ -18,7 +18,8 @@ describe "DateTime#to_time" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/datetime/to_time_spec.rb#L18
     time.sec.should == 59
   end
 
-  version_is(Date::VERSION, '3.2.3') do
+  date_version = defined?(Date::VERSION) ? Date::VERSION : '0.0.0'
+  version_is(date_version, '3.2.3') do
     it "returns a Time representing the same instant before Gregorian" do
       datetime = DateTime.civil(1582, 10, 4, 23, 58, 59)
       time = datetime.to_time.utc
diff --git a/spec/ruby/library/time/to_datetime_spec.rb b/spec/ruby/library/time/to_datetime_spec.rb
index c5561535b2..6025950b59 100644
--- a/spec/ruby/library/time/to_datetime_spec.rb
+++ b/spec/ruby/library/time/to_datetime_spec.rb
@@ -13,7 +13,8 @@ describe "Time#to_datetime" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/time/to_datetime_spec.rb#L13
     datetime.sec.should == 59
   end
 
-  version_is(Date::VERSION, '3.2.3') do
+  date_version = defined?(Date::VERSION) ? Date::VERSION : '0.0.0'
+  version_is(date_version, '3.2.3') do
     it "returns a DateTime representing the same instant before Gregorian" do
       time = Time.utc(1582, 10, 14, 23, 58, 59)
       datetime = time.to_datetime
-- 
cgit v1.2.1


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

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