Class | Module |
In: |
lib/ruby-debug-base.rb
|
Parent: | Object |
Wraps the meth method with Debugger.start {…} block.
# File lib/ruby-debug-base.rb, line 270 270: def debug_method(meth) 271: old_meth = "__debugee_#{meth}" 272: old_meth = "#{$1}_set" if old_meth =~ /^(.+)=$/ 273: alias_method old_meth.to_sym, meth 274: class_eval "def \#{meth}(*args, &block)\nDebugger.start do\ndebugger 2\n\#{old_meth}(*args, &block)\nend\nend\n" 275: end
Wraps the meth method with Debugger.post_mortem {…} block.
# File lib/ruby-debug-base.rb, line 288 288: def post_mortem_method(meth) 289: old_meth = "__postmortem_#{meth}" 290: old_meth = "#{$1}_set" if old_meth =~ /^(.+)=$/ 291: alias_method old_meth.to_sym, meth 292: class_eval "def \#{meth}(*args, &block)\nDebugger.start do |dbg|\ndbg.post_mortem do\n\#{old_meth}(*args, &block)\nend\nend\nend\n" 293: end