Module: Kernel

Defined in:
lib/ext/kernel.rb

Instance Method Summary collapse

Instance Method Details

#debuggerObject

Starts a debugging session if ruby-debug has been loaded (call waves-server –debugger to do load it).



4
5
6
# File 'lib/ext/kernel.rb', line 4

def debugger
  Waves::Logger.info "Debugger invoked but not loaded. Start server with --debugger to enable."
end

#engineObject

‘engine’ exists to provide a quick and easy (and MRI-compatible!) interface to the RUBY_ENGINE constant



11
# File 'lib/ext/kernel.rb', line 11

def engine; defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'; end

#safe_trap(*signals) ⇒ Object



14
15
16
17
# File 'lib/ext/kernel.rb', line 14

def safe_trap(*signals)
  signals.each { |s| trap(s) { yield } }
  Thread.new { loop { sleep 1 } } if RUBY_PLATFORM =~ /mswin32/
end