Project

General

Profile

Actions

Bug #12072

closed

SortedSet#superset? raises NoMethodError if rbtree is installed

Added by rhenium (Kazuki Yamaguchi) about 8 years ago. Updated over 6 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.4.0dev (2016-02-14 trunk 53823) [x86_64-linux]
[ruby-core:73807]

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

Also available in: Atom PDF

Like0
Like0Like0