Skip to content

Commit f151e01

Browse files
authored
Merge pull request rspec#2685 from bjfish/disable-memory-leak-spec-for-truffleruby
Disable memory leak spec for TruffleRuby
2 parents e2caa90 + 68dfd56 commit f151e01

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec/rspec/core/example_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,9 @@ def assert(val)
443443

444444
context 'memory leaks, see GH-321, GH-1921' do
445445
def self.reliable_gc
446-
0 != GC.method(:start).arity # older Rubies don't give us options to ensure a full GC
446+
# older Rubies don't give us options to ensure a full GC
447+
# TruffleRuby GC.start arity matches but GC.disable and GC.enable are mock implementations
448+
0 != GC.method(:start).arity && !(defined?(RUBY_ENGINE) && RUBY_ENGINE == "truffleruby")
447449
end
448450

449451
def expect_gc(opts)

0 commit comments

Comments
 (0)