From: zverok.offline@... Date: 2020-11-11T14:17:27+00:00 Subject: [ruby-core:100785] [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 zverok (Victor Shepelev). Actually, situation with documentation sites is kind of weird now (to say the least). * "Official" docs.ruby-lang.org always renders correctly, but other than that is not very usable (because of mixing all the lang and standard library together) * ruby-doc.org really "seems" official due to the domain name and high position in Google search, but is frequently behind (when some code structure is changed, it is not always rendered correctly there), closed-source and maintained by a single person (though, fairly responsive on Twitter) * rubydoc.info is affilated with YARD and its author, semi-official for the rubygems documentation hosting (though not supported by rubycentral?..) and also renders Ruby core docs. Somehow * there is also https://apidock.com/, closed-source, semi-abandoned (?) but high in Google results * finally, the most modern one is https://rubyapi.org/, open-source, actively developed, supported by the community, but also unofficial... The whole situation is kinda messy ---------------------------------------- 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-88430 * 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: