From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (smtp.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id BBA3719E0017 for ; Tue, 22 Dec 2015 08:23:19 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id 640A5B5D8BD for ; Tue, 22 Dec 2015 08:55:37 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id A547218CC7CC for ; Tue, 22 Dec 2015 08:55:37 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 58EC91204E1; Tue, 22 Dec 2015 08:55:35 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o10.shared.sendgrid.net (o10.shared.sendgrid.net [173.193.132.135]) by neon.ruby-lang.org (Postfix) with ESMTPS id 8CA7412040C for ; Tue, 22 Dec 2015 08:55:31 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=mFPTjn2nPfweSpLaloAAIanIxX8=; b=K6VNVbjaAp2Lqjd1YM BUiNUSfnJMXZkOvu36/2TS0REDQ0oUE4Fw+YkgLnxGPKR9r3STOK5MSlNX000c1v wsWs2zPjKgcTb3MhhgfyWLvEWZ9XJlMjXC+3cnF12HEcNIm+iyXsWdPldvtAPiTx ylg1jpcIaJuMmI08gDhAAxTOg= Received: by filter0921p1mdw1.sendgrid.net with SMTP id filter0921p1mdw1.558.5678916E4E 2015-12-21 23:55:26.65868751 +0000 UTC Received: from herokuapp.com (ec2-54-158-146-233.compute-1.amazonaws.com [54.158.146.233]) by ismtpd0001p1iad1.sendgrid.net (SG) with ESMTP id FyKk2_J4SF-PdwW_yd-bhA for ; Mon, 21 Dec 2015 23:55:26.796 +0000 (UTC) Date: Mon, 21 Dec 2015 23:55:26 +0000 From: deepjungle.maca@gmail.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 47025 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11841 X-Redmine-Issue-Author: deepj X-Redmine-Sender: deepj 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: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS6yiW5mvmky67Lpa4lUFK8+7j4OiaVNGCjbOv 4S4bcQHhM9QumMTY4cWcoPXq4L86WI25RR/paPRECi92kFr3AwMoDWtg88kOW3nNgIuQuRxT1YiBRZ laY2D2WlhZcpLmwsXsWXTSQWleA1boXKUWsn2YJlNFEXbBOmUo1JnapVSQ== X-ML-Name: ruby-core X-Mail-Count: 72424 Subject: [ruby-core:72424] [Ruby trunk - Bug #11841] StringIO with read and `nil, ''` arguments broken with enabled frozen string literal 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: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #11841 has been updated by deepj #. Thanks. In fact, I didn't realized the second argument is actually a buffer. My mistake ---------------------------------------- Bug #11841: StringIO with read and `nil, ''` arguments broken with enabled frozen string literal https://bugs.ruby-lang.org/issues/11841#change-55717 * Author: deepj # * Status: Rejected * Priority: Normal * Assignee: * ruby -v: ruby 2.3.0dev (2015-12-19 trunk 53195) [x86_64-darwin15] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- I'm not sure what behavior is expected here. But the following use case is used in rack (https://github.com/rack/rack/blob/master/test/spec_lint.rb#L496). If frozen string literal is enabled it throws `read': can't modify frozen String (RuntimeError), otherwise nothing. ~~~ # frozen_string_literal: true io = StringIO.new('') io.read(*[nil, '']) ~~~ -- https://bugs.ruby-lang.org/