From: Simon Schuster Date: 2007-09-08T04:21:52+09:00 Subject: Re: self-calling method ok ok. I'm glad I read that wrong, it caused me some confusion. On 9/7/07, Phrogz wrote: > On Sep 7, 8:51 am, "Simon Schuster" wrote: > > On 9/7/07, Erik Veenstra wrote: > > > What's the advantage of toBase36, compared to the built-in > > > to_s(36)? > > > > > p toBase36(30) > > > p 30.to_s(36) > > whaaaa, changing the base of a string? this is totally bizarre to me. > > > > 003:0> p 10.to_s > > "10" > > nil > > 004:0> p 10.to_s(14) > > "a" > > nil > > Er, you're not changing the base of a string. (That would be something > like 10.to_s.to_base(14).) You're changing the number to be > represented as a string in a specific base, via an argument to the > to_s method. > > >