From: Ralph Shnelvar on
[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


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
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.