Project

General

Profile

Bug #7630

Proc/block doesn't take keyword arguments

Added by ktsj (Kazuki Tsujimoto) over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
ruby 2.0.0dev (2012-12-28 trunk 38642) [x86_64-linux]
Backport:
[ruby-core:51172]

Description

=begin
$ ./ruby -e 'Proc.new{|k: 0|}.()'
-e:1:in block in <main>': undefined methodkey?' for 70368666077121:Fixnum (NoMethodError)

$ ./ruby -e '
def m
yield
end
m{|k: 0|}
'
-e:5:in block in <main>': undefined methodkey?' for nil:NilClass (NoMethodError)

$ ./ruby -e 'lambda{|k: 0|}.()'

I think Proc/block should take keyword arguments as well as lambda.
I've attached a patch.
=end


Files

proc-keyword-arg.patch (2.72 KB) proc-keyword-arg.patch ktsj (Kazuki Tsujimoto), 12/28/2012 08:47 PM

Related issues

Related to Ruby master - Bug #7665: keyrest argument overwrites the last element of rest argumentClosednobu (Nobuyoshi Nakada)01/07/2013Actions

Also available in: Atom PDF