From: k@... Date: 2016-02-14T15:17:18+00:00 Subject: [ruby-core:73807] [Ruby trunk Bug#12072] SortedSet#superset? raises NoMethodError if rbtree is installed Issue #12072 has been reported by Kazuki Yamaguchi. ---------------------------------------- Bug #12072: SortedSet#superset? raises NoMethodError if rbtree is installed https://bugs.ruby-lang.org/issues/12072 * Author: Kazuki Yamaguchi * Status: Open * Priority: Normal * Assignee: * ruby -v: ruby 2.4.0dev (2016-02-14 trunk 53823) [x86_64-linux] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN ---------------------------------------- If rbtree is installed, the following code doesn't work. ~~~ruby 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 #true, 2=>true}, default=nil, cmp_proc=nil> (NoMethodError) # from test.rb:6:in `
' ~~~ I attached a patch for this. ---Files-------------------------------- 0001-set-fix-SortedSet-superset-with-rbtree.patch (2.88 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: