summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_method.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/ruby/test_method.rb b/test/ruby/test_method.rb
index a355f86a17..91f4b99181 100644
--- a/test/ruby/test_method.rb
+++ b/test/ruby/test_method.rb
@@ -1618,8 +1618,11 @@ class TestMethod < Test::Unit::TestCase
def test_kwarg_eval_memory_leak
assert_no_memory_leak([], "", <<~RUBY, rss: true, limit: 1.2)
+ obj = Object.new
+ def obj.test(**kwargs) = nil
+
100_000.times do
- eval("Hash.new(foo: 123)")
+ eval("obj.test(foo: 123)")
end
RUBY
end