Skip to content

Commit

Permalink
Fix test suite on platforms without compaction support
Browse files Browse the repository at this point in the history
Fix: #354
  • Loading branch information
byroot committed Nov 21, 2023
1 parent e3cfc39 commit 2501bb6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@
end

if GC.respond_to?(:auto_compact=)
GC.auto_compact = true
begin
GC.auto_compact = true
rescue NotImplementedError
# Some platforms don't support compaction
end
end

IS_JRUBY = RUBY_ENGINE == 'jruby'
Expand Down

0 comments on commit 2501bb6

Please sign in to comment.