On 29 Aug 2001 23:08:04 +0900, Yukihiro Matsumoto wrote:
> Hi,
> 
> In message "[ruby-talk:20524] Problem with float numbers"
>     on 01/08/29, DaVinci <bombadil / wanadoo.es> writes:
> 
> | I have found a rare problem with float numbers. It only raises when I use
> | Gtk extension (or so I think).
> 
> I think it's caused by locale. Gtk calls setlocale() inside.
> Does ',' used for point in your locale?
> 
> Hmm, maybe we should abondon use of locale dependent printf(3).
> 
> 

I think you are correct
#[Wed Aug 29 16:36:38]:~
: [bagfors / detrius]$ ; LC_ALL=sv_SE ruby test.rb 
5,2.0

#[Wed Aug 29 16:38:42]:~
: [bagfors / detrius]$ ; ruby test.rb 
5.2

but where does the extra .0 come from???

/Erik

							matz.
-- 
Erik B?gfors               | erik / bagfors.nu
Supporter of free software | GSM +46 733 279 273
fingerprint: 6666 A85B 95D3 D26B 296B 6C60 4F32 2C0B 693D 6E32