```
On Nov 14, 10:49=A0am, Matthew Moss <m... / moss.name> wrote:
> -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
>
> The three rules of Ruby Quiz 2:
>
> 1. =A0Please do not post any solutions or spoiler discussion for this
> quiz until 48 hours have passed from the time on this message.
>
> 2. =A0Support Ruby Quiz 2 by submitting ideas as often as you can!
> Visit <http://splatbang.com/rubyquiz/>.
>
> 3. =A0Enjoy!
>
> Suggestion: =A0A [QUIZ] in the subject of emails about the problem
> the original quiz message, if you can.
>
> -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
>
> ## Unit Conversion (#183)
>
> Google added a calculator to its search engine a while back. Enter =A0
> "convert 50 miles to kilometers", or even just "50 mi to km", and the =A0
> first "search" result will tell you that 50 miles is 80.4672 =A0
> kilometers. This works for units other than length. Try "33 ml to =A0
> gal", "6 hours to minutes", and"50 stones to lbs", and you'll see that =
=A0
> Google's calculator knows a lot of different units and how to convert =A0
> between them all.
>
> Your task is to write a units converter script. The input to the =A0
> script must be three arguments: the quantity, the source units, and =A0
> the destination units. The first example above would be run like this:
>
> =A0 =A0 =A0\$ ruby convert.rb 50 miles kilometers
>
> Or, using abbreviations:
>
> =A0 =A0 =A0\$ ruby convert.rb 50 mi km
>
> Support as many units and categories of units (i.e. volume, length, =A0
> weight, etc.) as you can, along with appropriate abbreviations for =A0
> each unit.

This will be interesting. I'm not going to endeavor into myself b/c I
help maintain Stick (http://stick.rubyforge.org) which already does
this (and there's another lib out there that does it too). But it will
be interesting to see how others approach it.

Thanks,
T.

```