Everyone needs a little debug() now and then. The RHTML statement <%=
debug(x) %> will barf out the value of x into the output page, inside
a tasteful grey DIV.
Suppose x were a complex expression. Or suppose (quell horror!) we
have several debugs, and they come and go.
Suppose I wanted debug() to also report the expression. debug(x + 1)
would emit x + 1: 43.
How to do that in Ruby?
(I could do it trivially in >cough< C++…)
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!