On Thu, 7 Apr 2005 02:12:40 +0900, Nathaniel Talbott <ntalbott / gmail.com>  
wrote:

> On Apr 6, 2005 12:25 PM, Zev Blut <rubyzbibd / ubit.com> wrote:
>
>> I was disappointed to find that there is not an instance method for
>> Numeric that lets you convert the value to a hexadecimal string.
>
> ...
>
>> Or is there already a method that I missed?
>
> Try:
>
>   irb(main):002:0> 42.to_s(16)
>   => "2a"

Thanks for the info!  When you think about it this is a great
solution, but I wonder if it would be nice to alias this to another
method name like "base_string" or "radix".  It might be nice to even
have a few common conversion methods like hex, binary, and oct.  These
would certainly help make it easier to find for some people (like me).

Best,
Zev