summaryrefslogtreecommitdiff
path: root/test/ruby/test_method.rb
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-04-24 13:35:23 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-04-26 09:33:48 +0900
commit54eac83b2ad77ddea84fa6d66c09e0bb014cf61e (patch)
tree01dd78aef4d8a7ee300ff086b8a99e13ef8ecd42 /test/ruby/test_method.rb
parent5689c46457e6b078ac83b08b7e881e0050ebdfaa (diff)
Hide internal IDs
* parse.y (internal_id): number the ID serial for internal use by counting down from the neary maximum value, not to accidentally match permanent IDs. [Bug #15768]
Notes
Notes: Fixed: [Bug #15786]
Diffstat (limited to 'test/ruby/test_method.rb')
-rw-r--r--test/ruby/test_method.rb5
1 files changed, 5 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