diff options
| author | ksss <[email protected]> | 2017-04-02 23:30:05 +0900 |
|---|---|---|
| committer | ksss <[email protected]> | 2017-04-02 23:30:05 +0900 |
| commit | be5c304b4cb4dc99748f441210ee9cdbab33551c (patch) | |
| tree | 0ec9a5210bb76665ed209c85ca20fd74762c6d41 /mrbgems/mruby-proc-ext/test | |
| parent | 5d00e853143016128bd54a3d09dae5cc488b7b2b (diff) | |
| download | mruby-be5c304b4cb4dc99748f441210ee9cdbab33551c.tar.gz mruby-be5c304b4cb4dc99748f441210ee9cdbab33551c.zip | |
Fix parameters when noname rest
Diffstat (limited to 'mrbgems/mruby-proc-ext/test')
| -rw-r--r-- | mrbgems/mruby-proc-ext/test/proc.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mrbgems/mruby-proc-ext/test/proc.rb b/mrbgems/mruby-proc-ext/test/proc.rb index 75e11dd93..424c0bc1d 100644 --- a/mrbgems/mruby-proc-ext/test/proc.rb +++ b/mrbgems/mruby-proc-ext/test/proc.rb @@ -53,6 +53,7 @@ assert('Proc#parameters') do assert_equal([[:req, :a]], lambda {|a|}.parameters) assert_equal([[:opt, :a]], lambda {|a=nil|}.parameters) assert_equal([[:req, :a]], ->(a){}.parameters) + assert_equal([[:rest]], lambda { |*| }.parameters) assert_equal([[:rest, :a]], Proc.new {|*a|}.parameters) assert_equal([[:opt, :a], [:opt, :b], [:opt, :c], [:opt, :d], [:rest, :e], [:opt, :f], [:opt, :g], [:block, :h]], Proc.new {|a,b,c=:c,d=:d,*e,f,g,&h|}.parameters) assert_equal([[:req, :a], [:req, :b], [:opt, :c], [:opt, :d], [:rest, :e], [:req, :f], [:req, :g], [:block, :h]], lambda {|a,b,c=:c,d=:d,*e,f,g,&h|}.parameters) |
