1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Fixed never-defined symbol name

This commit is contained in:
Nobuyoshi Nakada 2020-03-04 21:00:17 +09:00
parent 95f387f61a
commit 502d9bcd36
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -98,7 +98,7 @@ module Fiddle
end
def test_no_memory_leak
prep = 'r = Fiddle::Function.new(Fiddle.dlopen(nil)["rb_obj_frozen"], [Fiddle::TYPE_UINTPTR_T], Fiddle::TYPE_UINTPTR_T); a = "a"'
prep = 'r = Fiddle::Function.new(Fiddle.dlopen(nil)["rb_obj_frozen_p"], [Fiddle::TYPE_UINTPTR_T], Fiddle::TYPE_UINTPTR_T); a = "a"'
code = 'begin r.call(a); rescue TypeError; end'
assert_no_memory_leak(%w[-W0 -rfiddle], "#{prep}\n1000.times{#{code}}", "10_000.times {#{code}}", limit: 1.2)
end