diff options
| author | Tatsuhiko Kubo <[email protected]> | 2014-07-13 01:27:28 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-12-21 12:59:38 +0900 |
| commit | d2fb4752e25c2772f5410e4887d9bddc9168ccdf (patch) | |
| tree | ebc5599eea2bd887137e79f0f49672047968434c | |
| parent | cc71bd51f1d914fd3ef1ba4b6555ca1b7c3087f4 (diff) | |
| download | mruby-d2fb4752e25c2772f5410e4887d9bddc9168ccdf.tar.gz mruby-d2fb4752e25c2772f5410e4887d9bddc9168ccdf.zip | |
Add test for Proc#parameters
| -rw-r--r-- | mrbgems/mruby-proc-ext/test/proc.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mrbgems/mruby-proc-ext/test/proc.rb b/mrbgems/mruby-proc-ext/test/proc.rb index 037d8d124..3e64bc103 100644 --- a/mrbgems/mruby-proc-ext/test/proc.rb +++ b/mrbgems/mruby-proc-ext/test/proc.rb @@ -13,6 +13,11 @@ assert('Proc#inspect') do assert_kind_of String, ins end +assert('Proc#parameters') do + parameters = Proc.new{|x,y=42,*other|}.parameters + assert_equal [[:opt, :x], [:opt, :y], [:rest, :other]], parameters +end + assert('Proc#lambda?') do assert_true lambda{}.lambda? assert_true !Proc.new{}.lambda? |
