Project

General

Profile

Actions

Bug #16111

closed

Combining default positional and keyword arguments is resulting in a `to_hash` method call

Added by mtelford (Michael Telford) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
2.6.3
[ruby-core:94422]

Description

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) ruby-bug.rb mtelford (Michael Telford), 08/19/2019 05:46 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0