diff options
author | flavio-b <flaviobombonatti@gmail.com> | 2025-03-20 18:24:02 -0700 |
---|---|---|
committer | Nobuyoshi Nakada <nobu.nakada@gmail.com> | 2025-03-21 10:30:40 +0900 |
commit | 80ab42462e94025f69db38c9359c65d108ebb51b (patch) | |
tree | 02823aebf5656875b44c8865ae400e7ea451dabd /range.c | |
parent | 65bc0ec62dee1e3210f5ce4e824f818beb718bcd (diff) |
[DOC] beginless and endless ranges inspect returns "nil..nil" always
Small correction to the Range docs. All beginless (nil..) and endless (..nil) ranges, as well as fully open ranges (nil..nil), display "nil..nil" when inspected, regardless of their original syntax.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12959
Diffstat (limited to 'range.c')
-rw-r--r-- | range.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -2661,14 +2661,14 @@ range_overlap(VALUE range, VALUE other) * end * a # => [2, 4, 6, 8, 10] * - * A range can be both beginless and endless. For literal beginless, endless + * A range can be both beginless and endless. For literal beginless, endless * ranges, at least the beginning or end of the range must be given as an * explicit nil value. It is recommended to use an explicit nil beginning and - * implicit nil end, since that is what Ruby uses for Range#inspect: + * end, since that is what Ruby uses for Range#inspect: * - * (nil..) # => (nil..) - * (..nil) # => (nil..) - * (nil..nil) # => (nil..) + * (nil..) # => (nil..nil) + * (..nil) # => (nil..nil) + * (nil..nil) # => (nil..nil) * * == Ranges and Other Classes * |