diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 8dbb3bd7..3556a7b6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -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'