lib/byebug/context.rb in byebug-1.0.2 vs lib/byebug/context.rb in byebug-1.0.3

- old
+ new

@@ -6,11 +6,19 @@ attr_accessor :handler end class Context - def frame_class(frame_no=0) - frame_self(frame_no).class + 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 interrupt self.stop_next = 1 end