lib/remnant/gc.rb in remnant-0.4.4 vs lib/remnant/gc.rb in remnant-0.4.5
- old
+ new
@@ -28,13 +28,17 @@
def _gc
Thread.current['remnant.gc'] ||= _gc_implementation
end
def _gc_implementation
- if ::GC.respond_to?(:time) && ::GC.respond_to?(:collections)
- Remnant::GC::Ree
+ if RUBY_VERSION >= '2.1.0'
+ Remnant::GC::Mri
else
- Remnant::GC::Base
+ if ::GC.respond_to?(:time) && ::GC.respond_to?(:collections)
+ Remnant::GC::Ree
+ else
+ Remnant::GC::Base
+ end
end
end
end
extend ClassMethods
end