summaryrefslogtreecommitdiff
path: root/test/fiddle/test_function.rb
diff options
context:
space:
mode:
authorJeremy Evans <[email protected]>2019-10-19 16:10:47 -0700
committerHiroshi SHIBATA <[email protected]>2019-10-24 19:34:49 +0900
commitb809784817649817c3e53fa000f57504446caef9 (patch)
treef278724c35c5d09bec3fd52049746dffced65c73 /test/fiddle/test_function.rb
parentce6caade7c57a505f73086ccd7b33c14f7715f22 (diff)
[ruby/fiddle] Remove taint support (#21)
Ruby 2.7 deprecates taint and it no longer has an effect. The lack of taint support should not cause a problem in previous Ruby versions. https://github.com/ruby/fiddle/commit/18d6fb6915
Diffstat (limited to 'test/fiddle/test_function.rb')
-rw-r--r--test/fiddle/test_function.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/fiddle/test_function.rb b/test/fiddle/test_function.rb
index eb8ef232e8..a58d7afcb1 100644
--- a/test/fiddle/test_function.rb
+++ b/test/fiddle/test_function.rb
@@ -98,7 +98,7 @@ module Fiddle
end
def test_no_memory_leak
- prep = 'r = Fiddle::Function.new(Fiddle.dlopen(nil)["rb_obj_tainted"], [Fiddle::TYPE_UINTPTR_T], Fiddle::TYPE_UINTPTR_T); a = "a"'
+ prep = 'r = Fiddle::Function.new(Fiddle.dlopen(nil)["rb_obj_frozen"], [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