diff options
author | Jeremy Evans <code@jeremyevans.net> | 2021-06-15 11:08:45 -0700 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2021-07-29 14:18:10 +0900 |
commit | 571dafdc7f57af067706fbc318a64778f4fc218a (patch) | |
tree | a4c69277e433805665140fa9058539082cf148ee /test/test_set.rb | |
parent | 27fb9d272daaae89089dfb61849ebe8e7aa6c833 (diff) | |
download | ruby-571dafdc7f57af067706fbc318a64778f4fc218a.tar.gz |
[ruby/set] Allow Set#intersect? and #disjoint? to accept array argument
Implements [Feature #17838]
https://github.com/ruby/set/commit/d9b389bafa
Diffstat (limited to 'test/test_set.rb')
-rw-r--r-- | test/test_set.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test_set.rb b/test/test_set.rb index af9806ed51..b92930a445 100644 --- a/test/test_set.rb +++ b/test/test_set.rb @@ -354,13 +354,17 @@ class TC_Set < Test::Unit::TestCase case expected when true assert_send([set, :intersect?, other]) + assert_send([set, :intersect?, other.to_a]) assert_send([other, :intersect?, set]) assert_not_send([set, :disjoint?, other]) + assert_not_send([set, :disjoint?, other.to_a]) assert_not_send([other, :disjoint?, set]) when false assert_not_send([set, :intersect?, other]) + assert_not_send([set, :intersect?, other.to_a]) assert_not_send([other, :intersect?, set]) assert_send([set, :disjoint?, other]) + assert_send([set, :disjoint?, other.to_a]) assert_send([other, :disjoint?, set]) when Class assert_raise(expected) { @@ -378,7 +382,7 @@ class TC_Set < Test::Unit::TestCase set = Set[3,4,5] assert_intersect(ArgumentError, set, 3) - assert_intersect(ArgumentError, set, [2,4,6]) + assert_intersect(true, set, Set[2,4,6]) assert_intersect(true, set, set) assert_intersect(true, set, Set[2,4]) |