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 E77CD19E0037 for ; Wed, 9 Dec 2015 06:03:48 +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 0D1B7B5D8E8 for ; Wed, 9 Dec 2015 06:35:31 +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 3970418CC7E9 for ; Wed, 9 Dec 2015 06:35:31 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id CAEE2120597; Wed, 9 Dec 2015 06:35:27 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by neon.ruby-lang.org (Postfix) with ESMTP id 84A191204DA for ; Wed, 9 Dec 2015 06:35:20 +0900 (JST) Received: from localhost (dcvr.yhbt.net [127.0.0.1]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPSA id 815046362CA; Tue, 8 Dec 2015 21:35:19 +0000 (UTC) Date: Tue, 8 Dec 2015 21:35:19 +0000 From: Eric Wong To: ruby-core@ruby-lang.org Message-ID: <20151208213519.GB10047@dcvr.yhbt.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ML-Name: ruby-core X-Mail-Count: 71957 Subject: [ruby-core:71957] Re: [Ruby trunk - Bug #11759] URI breaks with frozen strings 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" colin@invoca.com wrote: > > I prefer String.new() to "".dup because the former describes intention (of creating a buffer). > > Ok. I've attached a rev3 patch that uses `String.new` instead of `''.dup`. Thanks. Committed as r52981 > > In fact, my best choice is introducing String#+ that returns a mutable copy of a string. > > How would that be different from the current binary string operator `String#+` that does string concatenation? It actually calls the "+@" method as implemented in r52917 / [Feature #11782] But according to [ruby-core:71924], maybe it's not a good idea...