hybridgroup / kidsruby

KidsRuby is a Ruby programming environment meant for kids to learn and have fun!
http://kidsruby.com
Other
333 stars 104 forks source link

Number to string on alert command #12

Closed ujk closed 12 years ago

ujk commented 12 years ago

It says on "Basic Ruby" tutorial:

alert 2

but when I try to run this code it gives "/usr/lib/ruby/1.8/uri/common.rb:289:in `escape'" error message. When I try:

alert 2.to_s

it works well. I'm using Ruby 1.8.7 on Ubuntu.

phlipper commented 12 years ago

Hi Umit,

We are currently only targeting 1.9.2 and newer. Can you try on a newer version? Thanks.

ujk commented 12 years ago

I tried on RVM and Ruby 1.9.2p290 and I got this:

/home/ujk/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/uri/common.rb:219:in `escape': undefined method `gsub' for 1:Fixnum (NoMethodError)
from /home/ujk/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/uri/common.rb:505:in `escape'
from /home/ujk/Desktop/hybridgroup-kidsruby-153eefe/lib/kidsruby/interface.rb:23:in `call'
from /home/ujk/Desktop/hybridgroup-kidsruby-153eefe/lib/kidsruby/dialogs.rb:24:in `alert'
from /home/ujk/Desktop/hybridgroup-kidsruby-153eefe/tmp/kidcode.rb:3:in `'
phlipper commented 12 years ago

Thanks for the report. I will be looking in to this.

phlipper commented 12 years ago

/cc @deadprogrammer

ujk commented 12 years ago

"text.to_s" solved my problem thanks.