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

Kid wrote for how_many_times `50,000` #18

Closed krainboltgreene closed 10 years ago

krainboltgreene commented 12 years ago

It assumed the thing was a string.

phlipper commented 12 years ago

Any ideas about how this should be handled?

raluxgaza commented 12 years ago

We can have some kind of trigger that fires when it locates a pattern similar to what the kid has written, which would strip off the comma and return a valid integer value. Now, where to put this, I'm not sure.

def normalize_fixnum("number") valid_number = number.split(',').join.to_i end

krainboltgreene commented 12 years ago

We could always push a class along with the ask() method?

ask("How much money do you make?", Integer)

Not sure if that is easy or not for kids.

hunterboerner commented 10 years ago

Closing do to old age. Please retest on latest KidsRuby version and if problem persists, reopen the issue with details.