Skip to content

Instantly share code, notes, and snippets.

View RoUS's full-sized avatar

Ken Coar RoUS

View GitHub Profile
@RoUS
RoUS / toujours-debugger.rb
Created May 30, 2012 19:39
Keep your 'debugger' statements in even when testing on hosts lacking the gem
#
# This snippet allows you to sprinkle your code with #debugger references
# even if the ruby-debug gem isn't installed (or there's some other error
# encountered loading it).
#
begin
require('ruby-debug')
Debugger.start
rescue Exception => e
unless (Kernel.method_defined?(:debugger))