summaryrefslogtreecommitdiff
path: root/test/test_set.rb
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@idaemons.org>2020-09-20 23:23:13 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-12-04 19:23:35 +0900
commit46fc8d78a5d23d3c9a24e1bcc3c5cde4bce888de (patch)
treea1e52a035081028a81b8c4708c8a76a84a04f3af /test/test_set.rb
parent0adc426ca5cf83e57f5e8433a2f7b55fb7a1fad6 (diff)
[ruby/set] Resurrect support for Ruby 2.x
In Ruby 2.x, initialize_copy does not take a freeze option. https://github.com/ruby/set/commit/3da6c309df
Diffstat (limited to 'test/test_set.rb')
-rw-r--r--test/test_set.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test_set.rb b/test/test_set.rb
index 86f860222c..acb1cebe16 100644
--- a/test/test_set.rb
+++ b/test/test_set.rb
@@ -739,7 +739,7 @@ class TC_Set < Test::Unit::TestCase
set2.add 5
assert_equal Set[1,2,3,5], set2
assert_equal Set[1,2,3], set1
- end
+ end if Kernel.instance_method(:initialize_clone).arity != 1
def test_inspect
set1 = Set[1, 2]