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.7 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 BD85A1F4B4 for ; Fri, 9 Oct 2020 08:01:42 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 373921209C2; Fri, 9 Oct 2020 17:01: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 A82A21209C1 for ; Fri, 9 Oct 2020 17:01:01 +0900 (JST) Received: by filterdrecv-p3iad2-6fcd869f88-k5fx7 with SMTP id filterdrecv-p3iad2-6fcd869f88-k5fx7-18-5F8018DF-4 2020-10-09 08:01:35.027097679 +0000 UTC m=+120408.202644430 Received: from herokuapp.com (unknown) by ismtpd0121p1mdw1.sendgrid.net (SG) with ESMTP id 8TGSHqdXTXmaknqW1MmuMw for ; Fri, 09 Oct 2020 08:01:34.899 +0000 (UTC) Date: Fri, 09 Oct 2020 08:01:35 +0000 (UTC) From: muraken@gmail.com Message-ID: References: Mime-Version: 1.0 X-Redmine-MailingListIntegration-Message-Ids: 76212 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Feature X-Redmine-Issue-Id: 17195 X-Redmine-Issue-Author: Eregon X-Redmine-Sender: mrkn 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?zpFjjZpImXPpY=2FcRIKDq1ipXkOYTu+Zo9t1k7iA7niBIBElNg0gRtzJmHcMLET?= =?us-ascii?Q?8pM1XgH3NBvQ0kj90ssUZIMr3W0rhTnmt+BX5HG?= =?us-ascii?Q?X4+5qOnrs0b9IPLbXz0LWfVsMaUPHByF0SbU9VF?= =?us-ascii?Q?JuSh3wbPKx3Nvp6iNNaBCtZshap8Kpluyr+2xBQ?= =?us-ascii?Q?oUFec1kj18fBVJ6EhdMOSL6bcSNNHU+kLxDrxsC?= =?us-ascii?Q?eN5ijTwOSjga+yYfw=3D?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 100346 Subject: [ruby-core:100346] [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 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/