Project

General

Profile

Actions

Bug #14824

closed

Endless Range Support in irb

Added by jeremyevans0 (Jeremy Evans) over 6 years ago. Updated almost 4 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.6.0preview2 (2018-05-31 trunk 63539) [x86_64-openbsd]
[ruby-core:87394]
Tags:

Description

irb currently doesn't have great support for endless ranges, forcing you to use explicit parentheses around the endless range. Without explicit parentheses, it treats the endless range as a line continuation.

irb(main):001:0> 1..
irb(main):002:0* ;
=> 1..
irb(main):003:0> (1..)
=> 1..
irb(main):004:0>

Ranges with ends do not require parentheses in irb, and endless ranges should have the same behavior.


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #14808: Last token of endless range should have EXPR_ENDRejectedActions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0