From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=3.0 tests=AWL,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY shortcircuit=no autolearn=no autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 83F141F4B4 for ; Fri, 9 Oct 2020 18:15:45 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id DD0E41209E6; Sat, 10 Oct 2020 03:15:04 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id 4143C1209E5 for ; Sat, 10 Oct 2020 03:15:03 +0900 (JST) Received: by filterdrecv-p3mdw1-6685f47d68-rbs6q with SMTP id filterdrecv-p3mdw1-6685f47d68-rbs6q-18-5F80A8C9-36 2020-10-09 18:15:37.348410156 +0000 UTC m=+157183.252954249 Received: from herokuapp.com (unknown) by geopod-ismtpd-6-5 (SG) with ESMTP id 8WWIeB4ERIqeZFsuclyqDw for ; Fri, 09 Oct 2020 18:15:37.243 +0000 (UTC) Date: Fri, 09 Oct 2020 18:15:37 +0000 (UTC) From: eregontp@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 76216 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 17195 X-Redmine-Issue-Author: Eregon X-Redmine-Sender: Eregon X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: =?us-ascii?Q?KippOI8ZHtTweq7XfQzW93937kJ4QNWwSBuHnaMEcr0HJHvgbxPa+WF9bVc1+j?= =?us-ascii?Q?Jg9IsyOfniV8sn63F6wzH1PoL4zA3Ol5HwyczVs?= =?us-ascii?Q?pC3Q+BjKspHZcroUhVf38PdvYMBm0hnvf=2FOrYPW?= =?us-ascii?Q?UbwIx3tZBncS90o5pwao4+L7ULGaD0IV8tMHyVy?= =?us-ascii?Q?XrZKwcfBETbBKxjwqmRyLPri8lkkeedFTqPEGb1?= =?us-ascii?Q?3JuoYdvUEVe2EtTxw=3D?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 100350 Subject: [ruby-core:100350] [Ruby master Feature#17195] Freeze Enumerator::ArithmeticSequence objects X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #17195 has been updated by Eregon (Benoit Daloze). Status changed from Open to Rejected Right, that makes sense, thanks for the reply. Interestingly it seems `Enumerator#next` is still allowed even if the Enumerator is frozen, even though it is a kind of mutation. I think that's a bug. Given `ArithmeticSequence` has state through being an Enumerator, I think it's not reasonable to freeze, so I'll reject this issue. ---------------------------------------- Feature #17195: Freeze Enumerator::ArithmeticSequence objects https://bugs.ruby-lang.org/issues/17195#change-87962 * Author: Eregon (Benoit Daloze) * Status: Rejected * 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/