> Ugly solution: > def debug_eval(code, binding) > puts "#{code}\n=> #{eval(code, binding)}" > end I think there's some way to get the binding without passing it in. > Though IMHO all you need when you print the debug output of some > statement is a label, such as > p [:value_of_foo, foo_expression] > That's usually sufficient here. I mean, when you use such a statement > you *know* what expression you're inspecting. At least I seriously hope > that such statements are only used for short time inspection and for > that timeframe, your memory should be sufficient, no? Except that assert() should use the exact same reflection, to self-document, and should live forever. Ideally, we should not need assert_equal, assert_match, assert_near, assert_far, etc. We should only have assert, and it should generate a useful diagnostic based entirely on reflection. Our current suite of hacks exist to customize the diagnostic at fault time. -- Phlip http://www.oreilly.com/catalog/9780596510657/ ^ assert_xpath