From: muraken@gmail.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:100346] [Ruby master Feature#17195] Freeze Enumerator::ArithmeticSequence objects
Date: Fri, 09 Oct 2020 08:01:35 +0000 (UTC) [thread overview]
Message-ID: <redmine.journal-87958.20201009080134.772@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-17195.20200926132038.772@ruby-lang.org
Issue #17195 has been updated by mrkn (Kenta Murata).
The reason why ArithmeticSequence is a subclass of Enumerator is for conserving the compatibility of the return types of `Range#step` and `Numeric#step`.
----------------------------------------
Feature #17195: Freeze Enumerator::ArithmeticSequence objects
https://bugs.ruby-lang.org/issues/17195#change-87958
* Author: Eregon (Benoit Daloze)
* Status: Open
* Priority: Normal
----------------------------------------
Now, all Ranges are frozen (#15504).
Enumerator::ArithmeticSequence is very similar to Range, just with an extra `step`.
They're essentially already immutable, except that one could use set instance variables, but it seems of little use.
So, should we make Enumerator::ArithmeticSequence frozen too?
--
https://bugs.ruby-lang.org/
next prev parent reply other threads:[~2020-10-09 8:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-26 13:20 [ruby-core:100174] [Ruby master Feature#17195] Freeze Enumerator::ArithmeticSequence objects eregontp
2020-09-26 18:44 ` [ruby-core:100179] " marcandre-ruby-core
2020-09-27 10:05 ` [ruby-core:100187] " eregontp
2020-10-09 8:01 ` muraken [this message]
2020-10-09 18:15 ` [ruby-core:100350] " eregontp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.journal-87958.20201009080134.772@ruby-lang.org \
--to=ruby-core@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).