14 Jun
2026
14 Jun
'26
7:47 a.m.
Issue #22114 has been reported by p8 (Petrik de Heus). ---------------------------------------- Bug #22114: Endless ranges without parantheses can have unexpected results https://bugs.ruby-lang.org/issues/22114 * Author: p8 (Petrik de Heus) * Status: Open * Backport: 3.3: UNKNOWN, 3.4: UNKNOWN, 4.0: UNKNOWN ---------------------------------------- If a line ends with a endless ranges without parantheses, the range will continue on the next line making it the end of the range: ``` ruby range = 0.. foo = 20 range.end => 20 ``` This can be some what unexpected: ```ruby min = 100.clamp 0.. max = 20 min => 20 ``` -- https://bugs.ruby-lang.org/