Project

General

Profile

Actions

Bug #7630

closed

Proc/block doesn't take keyword arguments

Added by ktsj (Kazuki Tsujimoto) almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
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 method key?' for 70368666077121:Fixnum (NoMethodError)

$ ./ruby -e '
def m
yield
end
m{|k: 0|}
'
-e:5:in block in <main>': undefined method key?' 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 1 (0 open1 closed)

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

Also available in: Atom PDF

Like0
Like0Like0