Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (18 sloc) 346 Bytes
$dbg_ids = []
def dbg(id, format, *args)
if $dbg_ids.include?(id)
$stderr.puts(format%args)
end
end
def debug(*ids)
$dbg_ids = ($dbg_ids + ids).uniq
end
def undebug(*ids)
$dbg_ids -= ids
end
def dbg_indent(id, indent, format, *args)
if $dbg_ids.include?(id)
$stderr.print " "*indent
$stderr.puts(format%args)
end
end
You can’t perform that action at this time.