From: mathew
Date: 2005-12-17T06:57:45+09:00
Subject: String interpolation is a good thing (was Re: convert seconds to hours:minutes:seconds)
James Edward Gray II wrote:
> It's a good idea to get into the habit of using interpolation with
> Ruby. That let's Ruby take care of stringifying your values. We can
> also lose those \n characters:
>
> puts "Started at #{b4} and ended at #{after}."
> puts "Interval is #{interval}."
It's also faster. Or at least, it was on my system when I ran some
benchmarks.
mathew
--
My parents went to the lost kingdom of Hyrule
and all I got was this lousy triforce.