lib/mostash.rb in mostash-0.0.5 vs lib/mostash.rb in mostash-0.1.0

- old
+ new

@@ -1,10 +1,13 @@ require 'ostruct' require File.join(File.dirname(__FILE__), "mostash", "mostash") MoStash = Mostash -def dbg( msg ) +def dbg(obj, msg=nil) file, line, method_raw = caller[0].split('/').last.split(':') method = method_raw.match(/^in `(.+)'/)[1] - puts "#{method} (#{file}##{line}): #{msg}" + #puts "#{method} (#{file}##{line}): #{msg}" + msg += " " if msg + puts "#{msg}#{obj.inspect}" + obj end