ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:100442] [Ruby master Bug#17271] Array#[]= puts -1 at the end-component of the endless range in its exception message
@ 2020-10-20  5:00 muraken
  0 siblings, 0 replies; only message in thread
From: muraken @ 2020-10-20  5:00 UTC (permalink / raw
  To: ruby-core

Issue #17271 has been reported by mrkn (Kenta Murata).

----------------------------------------
Bug #17271: Array#[]= puts -1 at the end-component of the endless range in its exception message
https://bugs.ruby-lang.org/issues/17271

* Author: mrkn (Kenta Murata)
* Status: Assigned
* Priority: Normal
* Assignee: mrkn (Kenta Murata)
* ruby -v: ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN, 2.7: UNKNOWN
----------------------------------------
```
irb(main):001:0> [*0..5][-7..] = 1
Traceback (most recent call last):
        5: from /home/mrkn/.rbenv/versions/2.7/bin/irb:23:in `<main>'
        4: from /home/mrkn/.rbenv/versions/2.7/bin/irb:23:in `load'
        3: from /home/mrkn/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/irb-1.2.4/exe/irb:11:in `<top (required)>'
        2: from (irb):1
        1: from (irb):1:in `[]='
RangeError (-7..-1 out of range)
```

The message should be `-7.. out of range`.



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-20  5:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-20  5:00 [ruby-core:100442] [Ruby master Bug#17271] Array#[]= puts -1 at the end-component of the endless range in its exception message muraken

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).