Commit d2fb4752 authored by Tatsuhiko Kubo's avatar Tatsuhiko Kubo Committed by Yukihiro "Matz" Matsumoto

Add test for Proc#parameters

parent cc71bd51
......@@ -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?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment