Skip to content

Commit e52d18b

Browse files
authored
Merge pull request #355 from Shopify/handle-missing-compaction
Fix test suite on platforms without compaction support
2 parents e3cfc39 + 2501bb6 commit e52d18b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

spec/spec_helper.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@
2929
end
3030

3131
if GC.respond_to?(:auto_compact=)
32-
GC.auto_compact = true
32+
begin
33+
GC.auto_compact = true
34+
rescue NotImplementedError
35+
# Some platforms don't support compaction
36+
end
3337
end
3438

3539
IS_JRUBY = RUBY_ENGINE == 'jruby'

0 commit comments

Comments
 (0)