[ruby-core:74578] Re: [Ruby trunk Feature#12133] Ability to exclude start when defining a range

From: Matthew Kerwin <matthew@...>
Date: 2016-03-25 20:58:22 UTC
List: ruby-core #74578
On 26/03/2016 6:44 AM, <eregontp@gmail.com> wrote:
>
> Issue #12133 has been updated by Benoit Daloze.
>
>
> Ryan Hosford wrote:
> > I'm not proposing we support non-matching parenthesis or brackets.
Here's what I'm proposing:
>
> Am I missing something or the ability to exclude start could be done with
just (start.next..last) ?
> If that's the case, it seems to be too much of an effort to add new
syntax, or to complicate further Range's implementation.
>

That's only true for ranges of discrete values. A range like:
`(0.0..1.0).exclude_first` would look absolutely horrible as
`0.0.next_float..1.0`, and I don't think there's even an equivalent for
Rationals or Times.

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next