Prev: Will ruby programs using win32ole run on a Mac????
Next: synchronize between download and save in multi-threads?
From: Ralph Shnelvar on 13 Aug 2010 19:02 [Note: parts of this message were removed to make it a legal post.] I very often do something like: puts "some_variable.something = #{some_variable.something}" That repetition is getting annoying. Is there an idiomatic Ruby way to do something like puts_v some_variable.something
From: Ryan Davis on 13 Aug 2010 19:14 On Aug 13, 2010, at 4:02 PM, Ralph Shnelvar <ralphs(a)dos32.com> wrote: > I very often do something like: > puts "some_variable.something = #{some_variable.something}" > > That repetition is getting annoying. > > Is there an idiomatic Ruby way to do something like > puts_v some_variable.something Yes. assert_equal expected, actual
From: John Barnette on 13 Aug 2010 20:48
On Fri, Aug 13, 2010 at 4:02 PM, Ralph Shnelvar <ralphs(a)dos32.com> wrote: > I very often do something like: > Â puts "some_variable.something = #{some_variable.something}" > > That repetition is getting annoying. If you're repeating it that much, you're not writing enough tests. :) Using `p` can save you a bit of annoyance, but not much: p :something => some_variable.something ~ j. |