lib/debase/context.rb in debase-0.1.0 vs lib/debase/context.rb in debase-0.1.1

- old
+ new

@@ -2,11 +2,15 @@ class Context def frame_locals(frame_no=0) result = {} binding = frame_binding(frame_no) locals = eval("local_variables", binding) - locals.each {|local| result[local.to_s] = eval(local.to_s, binding)} + if locals.respond_to?(:each) + locals.each {|local| result[local.to_s] = eval(local.to_s, binding)} + else + result[locals.to_s] = eval(locals.to_s, binding) + end result end def frame_class(frame_no=0) frame_self(frame_no).class @@ -39,6 +43,6 @@ def at_return(file, line) handler.at_return(self, file, line) end end -end \ No newline at end of file +end