On 12.01.2007 10:59, Peñá wrote:
> I'd like to pass the "binding" argument as default on the debugger line, so that i do not have to state it; ie, just "debugger" instead of "debugger binding". Is that possible? tips, pls :)
No, but there is no need for eval here. This is as good:
class Object
def debug
md = caller[0].match /\A(.+):(\d+):/ || [nil, "unknown", "unknown"]
puts "FILE: #{md[1]} LINE: #{md[2]}, ID: #{object_id}, OBJECT:
#{inspect}"
end
end
Kind regards
robert