ruby / TryRuby

This 4th iteration of TryRuby is a website where you can learn the Ruby language.
https://try.ruby-lang.org
MIT License
224 stars 97 forks source link

Integer division creates floats instead of integers. #134

Closed raxoft closed 1 year ago

raxoft commented 2 years ago

I just tried TryRuby (in Firefox 100.0.2 64bit on Linux) and one of the first examples 30 / 4 shows the result 7.5. This is completely wrong, and it will confuse lot of beginners, because that's complete opposite of how it should work. I guess this has to do with running in browser instead of irb on server, but it really should be fixed, IMO.

eregon commented 1 year ago

Same issue as https://github.com/ruby/TryRuby/issues/122

hmdne commented 1 year ago

Fixed by #148

raxoft commented 1 year ago

Awesome, thanks!