From: njmoriarty@... Date: 2020-11-11T10:54:29+00:00 Subject: [ruby-core:100778] [Ruby master Bug#17317] In 2.7.2, Hash#except doesn't seem to exist, but is in the documentation Issue #17317 has been reported by aquila12 (Nick Moriarty). ---------------------------------------- Bug #17317: In 2.7.2, Hash#except doesn't seem to exist, but is in the documentation https://bugs.ruby-lang.org/issues/17317 * Author: aquila12 (Nick Moriarty) * Status: Open * Priority: Normal * ruby -v: ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux] * Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN ---------------------------------------- According to https://ruby-doc.org/core-2.7.2/Hash.html#method-i-except, Hash#except is available in 2.7.2, but it doesn't appear to actually be there. Run the following on the command line: ``` ruby -v -e 'h={a:1,b:2}; puts h, h.except(:a)' ``` Output: ``` ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux] Traceback (most recent call last): -e:1:in `
': undefined method `except' for {:a=>1, :b=>2}:Hash (NoMethodError) ``` This defines a Hash and then called `except` on it; the method appears to not be present although the docs indicate it is in this version. Indeed, I cannot find rb_hash_except in hash.c for 2.7.2. -- https://bugs.ruby-lang.org/ Unsubscribe: