From: zverok.offline@... Date: 2019-04-30T17:22:03+00:00 Subject: [ruby-core:92503] [Ruby trunk Bug#15745] There is no symmetry in the beginless range and the endless range using `Range#inspect` Issue #15745 has been updated by zverok (Victor Shepelev). > I'd like to avoid "don't care". Even if we don't care, we need to choose one of them. Yes, but from my perspective, the whole choice (being it a further discussion, simple voting, Matz's decision) is only about "how the `nil..nil` is represented", while representation of `1..` and `..1` should be just this: `1..` and `..1`. TBH, for even for `nil..nil` it is hard to imagine reasons for representation other than `..` (following the logic described above), only if just "aestetics"?.. ---------------------------------------- Bug #15745: There is no symmetry in the beginless range and the endless range using `Range#inspect` https://bugs.ruby-lang.org/issues/15745#change-77864 * Author: koic (Koichi ITO) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: ruby 2.7.0dev (2019-04-03 trunk 67423) [x86_64-darwin17] * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- 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`? -- https://bugs.ruby-lang.org/ Unsubscribe: