General

Profile

masasakano (Masa Sakano)

  • Login: masasakano
  • Registered on: 08/29/2022
  • Last sign in: 08/29/2022

Issues

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

Activity

09/03/2022

03:20 PM Ruby Bug #18994 (Closed): Range#last(n) returns empty for single-element Integer Range
`Range#last(n)` with a single-element of Integer returns an empty Array. It should return a one-element Array.
Interestingly, when the element is a String, `last(n)` returns a one-element Array, expectedly.
I have checked the behav...
masasakano (Masa Sakano)

09/02/2022

06:18 PM Ruby Bug #18993 (Closed): Inconsistent Range#size for Float and Rational
The returned values of Range#size between Rational and Float and also with regard to `exclude_end` of true and false are inconsistent.
The example below highlights the difference. The first and second should return the same value. The...
masasakano (Masa Sakano)

08/30/2022

07:51 PM Ruby Feature #18986 (Open): Raises Exception for Range#last(n) with Float::INFINITY
When a (Numeric) argument is given to `Range#last(n)` for a Range with `Float::INFINITY`, it runs into an infinite loop (see a small code snippet below).
There is no use case for the feature as far as I can think of, and it is hard to d...
masasakano (Masa Sakano)

08/29/2022

02:39 PM Ruby Misc #18984 (Closed): Doc for Range#size for Float/Rational does not make sense
When `Range` consists of any Numeric, according to [Official docs for Ruby-3.1.2](https://ruby-doc.org/core-3.1.2/Range.html#method-i-size), `Range#size` should,
> Returns the count of elements in self if both begin and end values ar...
masasakano (Masa Sakano)
02:10 PM Ruby Bug #18983 (Closed): Range#size for beginless Range is not nil.
`Range#size` should, according to [Official docs](https://ruby-doc.org/core-3.1.2/Range.html#method-i-size),
> Returns the count of elements in self if both begin and end values are numeric; otherwise, returns nil
but it doesn't wi...
masasakano (Masa Sakano)

Also available in: Atom