From: "Carlo E. Prelz" Date: 2013-01-12T15:15:39+09:00 Subject: Re: Any ideas why IRB would be different than running the code? Subject: Any ideas why IRB would be different than running the code? Date: Sat 12 Jan 13 06:24:34AM +0900 Quoting Wayne Brisette (wbrisett@att.net): > Any ideas why IRB would differ? Is there something wrong in my code? Must be something different in the script you use. If I execute this script: --8<----8<----8<----8<----8<----8<----8<----8<-- class String def convert_base(from,to) self.to_i(from).to_s(to) end end ttext=10 puts("Result: #{ttext.to_s.convert_base(2,16)}") --8<----8<----8<----8<----8<----8<----8<----8<-- I obtain Result: 2 Carlo -- * Se la Strada e la sua Virtu' non fossero state messe da parte, * K * Carlo E. Prelz - fluido@fluido.as che bisogno ci sarebbe * di parlare tanto di amore e di rettitudine? (Chuang-Tzu)