From: mame@... Date: 2020-11-11T13:01:42+00:00 Subject: [ruby-core:100783] [Ruby master Bug#17317] In 2.7.2, Hash#except doesn't seem to exist, but is in the documentation Issue #17317 has been updated by mame (Yusuke Endoh). If I recall correctly, we have received some issue reports about ruby-doc.org maybe because the site looks official to many people. The site is undoubtedly valuable to Ruby ecosystem, but the confusion is a bit unfortunate. I wonder if we can do anything. ---------------------------------------- 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#change-88428 * Author: aquila12 (Nick Moriarty) * Status: Third Party's Issue * 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: