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

ruby-changes:62144

From: Jeremy <ko1@a...>
Date: Mon, 6 Jul 2020 08:56:26 +0900 (JST)
Subject: [ruby-changes:62144] 6607212224 (master): [ruby/bigdecimal] Make tests pass on Ruby 2.4

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

From 6607212224401d852c0056b841be7ff95236e8f7 Mon Sep 17 00:00:00 2001
From: Jeremy Evans <code@j...>
Date: Wed, 9 Oct 2019 14:10:04 -0700
Subject: [ruby/bigdecimal] Make tests pass on Ruby 2.4

https://github.com/ruby/bigdecimal/commit/9d19e842ee

diff --git a/test/bigdecimal/test_bigdecimal.rb b/test/bigdecimal/test_bigdecimal.rb
index 874338b..0a190d2 100644
--- a/test/bigdecimal/test_bigdecimal.rb
+++ b/test/bigdecimal/test_bigdecimal.rb
@@ -1887,9 +1887,10 @@ class TestBigDecimal < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/bigdecimal/test_bigdecimal.rb#L1887
   def test_initialize_copy_dup_clone_frozen_error
     bd = BigDecimal(1)
     bd2 = BigDecimal(2)
-    assert_raise(FrozenError) { bd.send(:initialize_copy, bd2) }
-    assert_raise(FrozenError) { bd.send(:initialize_clone, bd2) }
-    assert_raise(FrozenError) { bd.send(:initialize_dup, bd2) }
+    err = RUBY_VERSION >= '2.5' ? FrozenError : TypeError
+    assert_raise(err) { bd.send(:initialize_copy, bd2) }
+    assert_raise(err) { bd.send(:initialize_clone, bd2) }
+    assert_raise(err) { bd.send(:initialize_dup, bd2) }
   end
 
   def assert_no_memory_leak(code, *rest, **opt)
-- 
cgit v0.10.2


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

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