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

ruby-changes:65927

From: Hiroshi <ko1@a...>
Date: Thu, 22 Apr 2021 13:35:47 +0900 (JST)
Subject: [ruby-changes:65927] 01f131457f (master): Separate test used by test_ractor for Ractor in test_time.rb

https://git.ruby-lang.org/ruby.git/commit/?id=01f131457f

From 01f131457ffac39f018b342fbd5f7598171d10fa Mon Sep 17 00:00:00 2001
From: Hiroshi SHIBATA <hsbt@r...>
Date: Thu, 22 Apr 2021 13:35:30 +0900
Subject: Separate test used by test_ractor for Ractor in test_time.rb

---
 test/test_time.rb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/test/test_time.rb b/test/test_time.rb
index d56daeb..b50d841 100644
--- a/test/test_time.rb
+++ b/test/test_time.rb
@@ -64,8 +64,10 @@ class TestTimeExtension < Test::Unit::TestCase # :nodoc: https://github.com/ruby/ruby/blob/trunk/test/test_time.rb#L64
 
   if defined?(Ractor)
     def test_rfc2822_ractor
-      actual = Ractor.new { Time.rfc2822("Fri, 21 Nov 1997 09:55:06 -0600") }.take
-      assert_equal(Time.utc(1997, 11, 21, 9, 55, 6) + 6 * 3600, actual)
+      assert_ractor(<<~RUBY, require: 'time')
+        actual = Ractor.new { Time.rfc2822("Fri, 21 Nov 1997 09:55:06 -0600") }.take
+        assert_equal(Time.utc(1997, 11, 21, 9, 55, 6) + 6 * 3600, actual)
+      RUBY
     end
   end
 
-- 
cgit v1.1


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

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