Module: HeapScope::Runtime

Defined in:
lib/heapscope/runtime.rb,
lib/heapscope/runtime/mri.rb,
lib/heapscope/runtime/base.rb,
lib/heapscope/runtime/jruby.rb,
lib/heapscope/runtime/truffleruby.rb,
lib/heapscope/runtime/windows_rss.rb

Defined Under Namespace

Modules: WindowsRSS Classes: Base, JRuby, MRI, TruffleRuby

Class Method Summary collapse

Class Method Details

.currentObject



12
13
14
# File 'lib/heapscope/runtime.rb', line 12

def current
  @current ||= detect
end

.detectObject



20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/heapscope/runtime.rb', line 20

def detect
  case RUBY_ENGINE
  when "ruby"
    MRI.new
  when "jruby"
    JRuby.new
  when "truffleruby"
    TruffleRuby.new
  else
    Base.new(engine: RUBY_ENGINE)
  end
end

.reset!Object



16
17
18
# File 'lib/heapscope/runtime.rb', line 16

def reset!
  @current = nil
end