On 29 Aug 2001 23:01:36 +0900, DaVinci wrote:
>  Hello.
> 
>  I have found a rare problem with float numbers. It only raises when I use
>  Gtk extension (or so I think).
> 
>  I have made tests with irb:
> 
> 	> puts 2.6 * 2
> 	5.2
> 	nil
> 	>
> 
>  That's ok.
> 
>  But now try to execute next example:
> 
> ----------------------------------------------------
> #!/usr/bin/ruby
> 
> require 'gtk'
> 
> class Main
> 	def initialize
> 		@win = Gtk::Window.new
> 		@win.signal_connect('destroy') do
> 			Gtk::main_quit
> 		end
> 		
> 		@cont = Gtk::VBox.new(false, 5)
> 		@win.add(@cont)
> 
> 		@caja = Gtk::HBox.new
> 		@cont.pack_end(@caja)
> 		boton1 = Gtk::Button.new('Hello')
> 		@caja.pack_start(boton1)
> 		boton1.signal_connect("clicked") do puts 2.6 * 2 end
> 		@win.show_all
> 	end
> end
>
> Main.new
>
> Gtk.main 

: [bagfors / detrius]$ ; ruby test.rb 
5.2

works for me

/Erik


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