Actions
Bug #12072
closedSortedSet#superset? raises NoMethodError if rbtree is installed
Description
If rbtree is installed, the following code doesn't work.
require "set"
set_a = SortedSet.new([1, 2])
set_b = SortedSet.new([1, 2, 3])
p set_a >= set_b
# /home/k/.rbenv/versions/trunk/lib/ruby/2.4.0/set.rb:223:in `superset?': undefined method `>=' for #<RBTree: {1=>true, 2=>true}, default=nil, cmp_proc=nil> (NoMethodError)
# from test.rb:6:in `<main>'
I attached a patch for this.
Files
Actions
Like0
Like0Like0