lib/byebug/context.rb in byebug-1.5.0 vs lib/byebug/context.rb in byebug-1.6.0

- old
+ new

@@ -6,40 +6,27 @@ attr_accessor :handler end class Context - def frame_args frame_no = 0 - bind = frame_binding frame_no - return [] unless eval "__method__", bind - begin - eval "self.method(__method__).parameters.map{|(attr, mid)| mid}", bind - rescue NameError => e - print "(WARNING: retreving args from frame #{frame_no} => " \ - "#{e.class} Exception: #{e.message})\n " - return [] - end - end - def frame_locals frame_no = 0 bind = frame_binding frame_no eval "local_variables.inject({}){|h, v| h[v] = eval(v.to_s); h}", bind end - def frame_args_info + def frame_args frame_no = 0 bind = frame_binding frame_no return [] unless eval "__method__", bind eval "self.method(__method__).parameters", bind end def handler Byebug.handler or raise 'No interface loaded' end - def at_breakpoint(breakpoint) - handler.at_breakpoint(self, breakpoint) unless - IGNORED_FILES.include?(breakpoint.source) + def at_breakpoint(brkpnt) + handler.at_breakpoint(self, brkpnt) end def at_catchpoint(excpt) handler.at_catchpoint(self, excpt) end @@ -48,8 +35,12 @@ handler.at_tracing(self, file, line) unless IGNORED_FILES.include?(file) end def at_line(file, line) handler.at_line(self, file, line) unless IGNORED_FILES.include?(file) + end + + def at_return(file, line) + handler.at_return(self, file, line) unless IGNORED_FILES.include?(file) end end end