Bug #8139
closed
Added by no6v (Nobuhiro IMAI) over 11 years ago.
Updated over 11 years ago.
Description
=begin
Passing a hash without required key (:keyreq) to a method which takes keyreq: and **keyrest,
then a same hash is set to both keyreq and keyrest.
def m(keyreq:, **keyrest)
[keyreq, keyrest]
end
m(keyreq: 1, keyrest: 2) # => [1, {:keyrest => 2}] OK
m(unknown: 3) # => [{:unknown=>3}, {:unknown=>3}] ??
=end
- Status changed from Open to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r39869.
Nobuhiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
vm_insnhelper.c: check required kwarg with resthash
- vm_insnhelper.c (vm_callee_setup_keyword_arg): should check required
keyword arguments even if rest hash is defined. [ruby-core:53608]
[Bug #8139]
- Tracker changed from Bug to Backport
- Project changed from Ruby master to Backport200
- Category deleted (
core)
- Status changed from Closed to Assigned
- Assignee set to nagachika (Tomoyuki Chikanaga)
I think this is definitely a bugfix. I'll backport r39869.
- Tracker changed from Backport to Bug
- Project changed from Backport200 to Ruby master
- Status changed from Assigned to Closed
- Assignee changed from nagachika (Tomoyuki Chikanaga) to nobu (Nobuyoshi Nakada)
It is a bugfix about require keyword arguments which is a new feature of 2.1. [Feature #7701]
No need to backport. sorry.
Also available in: Atom
PDF
Like0
Like0Like0Like0