summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_method.rb5
-rw-r--r--test/ruby/test_proc.rb3
2 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb
index beffaa8ce0..4e20534dfa 100644
--- a/test/ruby/test_method.rb
+++ b/test/ruby/test_method.rb
@@ -615,6 +615,11 @@ class TestMethod < Test::Unit::TestCase
assert_equal([[:req, :a], [:opt, :b], [:rest, :c], [:req, :d], [:keyrest, :o]], self.class.instance_method(:pmk7).parameters)
end
+ def test_hidden_parameters
+ instance_eval("def m((_)"+",(_)"*256+");end")
+ assert_empty(method(:m).parameters.map{|_,n|n}.compact)
+ end
+
def test_public_method_with_zsuper_method
c = Class.new
c.class_eval do
diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb
index 10ae02849d..17def93362 100644
--- a/test/ruby/test_proc.rb
+++ b/test/ruby/test_proc.rb
@@ -1137,6 +1137,9 @@ class TestProc < Test::Unit::TestCase
assert_equal([[:req]], method(:putc).parameters)
assert_equal([[:rest]], method(:p).parameters)
+
+ pr = eval("proc{|"+"(_),"*30+"|}")
+ assert_empty(pr.parameters.map{|_,n|n}.compact)
end
def pm0() end