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 (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 1861519E005C for ; Sat, 19 Dec 2015 01:01:33 +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 6B905B5D866 for ; Sat, 19 Dec 2015 01:33:42 +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 1C88818CC7E6 for ; Sat, 19 Dec 2015 01:33:41 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 45DF7120461; Sat, 19 Dec 2015 01:33:40 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o2.heroku.sendgrid.net (o2.heroku.sendgrid.net [67.228.50.55]) by neon.ruby-lang.org (Postfix) with ESMTPS id 25994120419 for ; Sat, 19 Dec 2015 01:33:35 +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=b+/IRlEG8HOck/GLlSwhgGgg2Gw=; b=RDcbICTJ5UIqaLOHXE AUJnE3nVX39G6HxBuJ7Q2kCK27GRiLoE6fgOXWk1CAMIyNOoXM2W5aXUmZ7xl7HV GBqq8CSljAD9M4FsN/oAeIwvMCumJfLWmp/XLWus2lApvdoQotWy7UY4uaUMlWfT t24uJ9dEsklJo3sJ6wt/9fKKM= Received: by filter0465p1mdw1.sendgrid.net with SMTP id filter0465p1mdw1.14249.5674355945 2015-12-18 16:33:29.487392082 +0000 UTC Received: from herokuapp.com (ec2-54-242-87-41.compute-1.amazonaws.com [54.242.87.41]) by ismtpd0006p1iad1.sendgrid.net (SG) with ESMTP id sdPTHV-oTwKsHY-G6NKAcg for ; Fri, 18 Dec 2015 16:33:29.246 +0000 (UTC) Date: Fri, 18 Dec 2015 16:33:29 +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: 46961 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/Ymy4QrNMhiuLXJG8OTL2vJD1yS79AVBjkcCQkVnwIjfqfO314PY0lQg2xXxnya ioy/13pMEteZlrt8hzNCZ01Pwfq1jfaA/hTMuXUYT/8tLQxkWNFFyjRjUepC+x/yrJpgDkRg/xvGAW ZyC1zYQDDBGmDsPzhxIftvgmc9WydCSHgTT/zAfooB5D/MT8jmvpoj+jqQ== X-SendGrid-Contentd-ID: {"test_id":"1450456411"} X-ML-Name: ruby-core X-Mail-Count: 72367 Subject: [ruby-core:72367] [Ruby trunk - Bug #11841] [Open] 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 reported by deepj #. ---------------------------------------- Bug #11841: StringIO with read and `nil, ''` arguments broken with enabled frozen string literal https://bugs.ruby-lang.org/issues/11841 * Author: deepj # * Status: Open * Priority: Normal * Assignee: * ruby -v: * 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/