[ruby-core:94446] [Ruby master Bug#16111] Combining default positional and keyword arguments is resulting in a `to_hash` method call

From: michael.telford@...
Date: 2019-08-20 14:26:48 UTC
List: ruby-core #94446
Issue #16111 has been updated by mtelford (Michael Telford).


Ok, the situation with keyword parameters is now making more sense, despite not being ideal. Since ruby 3 should implement a fix (backwards compatible or not) I am happy for this issue to be closed. 

Thanks to those who commented to bring me up to speed :-)

----------------------------------------
Bug #16111: Combining default positional and keyword arguments is resulting in a `to_hash` method call
https://bugs.ruby-lang.org/issues/16111#change-80872

* Author: mtelford (Michael Telford)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 2.6.3
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
Combining default positional and keyword arguments is resulting in a `to_hash` method call when I don't believe it should be. It's affecting some code I am writing. The full details of the behaviour I'm describing can be seen in the attached script.

I would like to know why the method `to_hash` is being called (only in certain circumstances) and if this is a bug to be fixed or desired behaviour (and why?).

Thank in advance!

---Files--------------------------------
ruby-bug.rb (1.44 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next