Project

General

Profile

Actions

Bug #15745

closed

There is no symmetry in the beginless range and the endless range using `Range#inspect`

Added by koic (Koichi ITO) about 5 years ago. Updated almost 5 years ago.

Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.7.0dev (2019-04-03 trunk 67423) [x86_64-darwin17]
[ruby-core:92124]

Description

The following commit introduces beginless range.
https://github.com/ruby/ruby/commit/95f7992b89efd35de6b28ac095c4d3477019c583

% ruby -v
ruby 2.7.0dev (2019-04-03 trunk 67423) [x86_64-darwin17]

There is no symmetry with endless range when using Range#inspect method.

(1..).inspect # => "1.."
(..5).inspect # => "nil..5"

How about unifying whether it represents nil?


Related issues 1 (0 open1 closed)

Related to Ruby master - Feature #14799: Startless rangeClosedmatz (Yukihiro Matsumoto)Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0