General

Profile

ankane (Andrew Kane)

  • Login: ankane
  • Registered on: 05/15/2020
  • Last connection: 08/09/2020

Issues

open closed Total
Assigned issues 0 0 0
Reported issues 1 0 1

Activity

05/16/2020

01:43 AM Ruby master Feature #16894: Integer division for Ruby 3
fwiw, array indexing code likely wouldn't need changed.
``` ruby
a = ["zero", "one", "two"]
a[1/2] # "zero"
a...
ankane (Andrew Kane)

05/15/2020

09:52 AM Ruby master Feature #16894: Integer division for Ruby 3
Here's a good read on the thoughts and motivation behind Python changing it: https://www.python.org/dev/peps/pep-0238/ ankane (Andrew Kane)
04:39 AM Ruby master Feature #16894: Integer division for Ruby 3
Thanks for the responses!
Re 0.5 vs 1/2r: In my experience, developers use floats way more than rationals.
Re "...
ankane (Andrew Kane)
03:29 AM Ruby master Feature #16894: Integer division for Ruby 3
Sorry, for the edits, first issue! Changed normal to floating point. ankane (Andrew Kane)
03:20 AM Ruby master Feature #16894 (Open): Integer division for Ruby 3
Hi Ruby team,
It'd be great if division in Ruby matched what we all learned in school.
``` ruby
1 / 2 == 0.5
...
ankane (Andrew Kane)

Also available in: Atom