From: "jeremyevans0 (Jeremy Evans)" Date: 2022-03-30T18:02:32+00:00 Subject: [ruby-core:108124] [Ruby master Bug#18671] ruby2_keywords_hash not #equal? to itself with __send__ Issue #18671 has been updated by jeremyevans0 (Jeremy Evans). Status changed from Open to Rejected This is expected. When you use `*args`, it passes the flagged hash as keywords (new hash), it doesn't pass it through directly. This has nothing to do with `__send__`, you get the same false result using `p h.equal?(*args)`. ---------------------------------------- Bug #18671: ruby2_keywords_hash not #equal? to itself with __send__ https://bugs.ruby-lang.org/issues/18671#change-97094 * Author: Eregon (Benoit Daloze) * Status: Rejected * Priority: Normal * ruby -v: ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-linux] * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN ---------------------------------------- ```ruby h = {a: 1} h = Hash.ruby2_keywords_hash(h) args = [h] p h.equal?(h) # => true p h.__send__(:equal?, *args) # => false ``` -- https://bugs.ruby-lang.org/ Unsubscribe: