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 D6F5A19E005C for ; Fri, 18 Dec 2015 12:42:17 +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 E4874B5D88C for ; Fri, 18 Dec 2015 13:14:24 +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 4C7C418CC7CC for ; Fri, 18 Dec 2015 13:14:25 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 9D75A12074E; Fri, 18 Dec 2015 13:13:33 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from mail-io0-f172.google.com (mail-io0-f172.google.com [209.85.223.172]) by neon.ruby-lang.org (Postfix) with ESMTPS id E6D12120722 for ; Fri, 18 Dec 2015 13:13:12 +0900 (JST) Received: by mail-io0-f172.google.com with SMTP id 186so78903570iow.0 for ; Thu, 17 Dec 2015 20:13:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:message-id:subject:mime-version:content-type; bh=XYnMg4+hl4403x3X0mRFASfMOnoQMyK7I3y5+CGmjm0=; b=0+fBH5CKRnGOlEn2MKL3nN+RttQT8PB8cTa5u+TCr6gIg3g2uL+tsipyvU3UrXPh0A Gl9xNpDa+pnAA/d+SAz+nJLT16Q0GyIYjGZoFdtP7S1lI/yAmOOTwrL+OoBncZ/v6raR OSSqajSV/M23l4KyKQxuczWKY8so2WEjXFeSRWKVYrGKJzfSv3h90ypROSG05OoJ2m+z SFFkHldSsokZXMgKFrZ4T1xJ+/uOfwa+SntXuxEWiGaMtHjaglRVfs4CLcO0wuWkMpQb NRQ3jEmiolan/pXaDPrb7JdfzetsofDppNpYiQ1jMHBJ23E+HslL51KlO8GPYv+h71QL V6og== X-Received: by 10.107.16.27 with SMTP id y27mr2301394ioi.21.1450411991714; Thu, 17 Dec 2015 20:13:11 -0800 (PST) Received: from Josephe-Jones (75-166-130-47.hlrn.qwest.net. [75.166.130.47]) by smtp.gmail.com with ESMTPSA id q5sm1965834igh.6.2015.12.17.20.13.10 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 17 Dec 2015 20:13:11 -0800 (PST) Date: Thu, 17 Dec 2015 21:13:10 -0700 From: Joseph Jones To: Ruby developers Cc: Message-ID: X-Mailer: BoxerFree 6.0.4 (321) X-Boxer-Generated: true X-Boxer-IsLike: true MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="567387d6_7de67713_16c" X-ML-Name: ruby-core X-Mail-Count: 72334 Subject: [ruby-core:72334] [Ruby trunk - Feature #11100] Permit multiple captures with String[Regexp, ...] 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" --567387d6_7de67713_16c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Joseph Jones liked your message with Boxer. On December 10, 2015 at 16:35= :21 MST, djberg96=40gmail.com wrote:Issue =2311100 has been updated by Da= niel Berger.I support allowing multiple captures. I think the =5B1,2=5D s= yntax is the most intuitive.----------------------------------------=46ea= ture =2311100: Permit multiple captures with String=5BRegexp, ...=5Dhttps= ://bugs.ruby-lang.org/issues/11100=23change-55454* Author: D.E. Akers* St= atus: Open* Priority: Normal* Assignee: ---------------------------------= -------I propose that if we are able to conveniently grab one capture wit= h this method, we ought to be able to grab more than one. Still, there ar= e some caveats worth considering:* It should return an array, but every o= ther =60=23=5B=5D=60 variant returns a string or =60nil=60.* Should the a= rgument be an array, or should the method be variadic=3F - Array argument= looks a little =22noisy=22=3F =60'123abc'=5B/(=5Cd+)(=5Cw+)/, =5B2, 1=5D= =5D=60 - Variadic method requires intrusive modification of internal call= s to =60rb=5Fstr=5Fsubpat()=60.* Complementary =60=23=5B=5D=3D=60 would b= e crpytic, overly complex, and likely go unused, but not adding it would = break the symmetry.I realize this is essentially an outline of why not to= implement this feature, but I figured I'd toss it out there for feedback= . Thoughts=3F---=46iles--------------------------------string=5Fslice=5Fm= any=5Fcaptures.patch (906 Bytes)-- https://bugs.ruby-lang.org/ --567387d6_7de67713_16c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Joseph Jones liked your message with Boxer.


= On December 10, 2015 at 16:35:21 MST, djberg96=40gmail.com wrote:
Issue =2311100 has been updat= ed by Daniel Berger.


I support allowing multiple capture= s. I think the =5B1,2=5D syntax is the most intuitive.

-------= ---------------------------------
=46eature =2311100: Permit multipl= e captures with String=5BRegexp, ...=5D
https://bugs.ruby-lang.org/i= ssues/11100=23change-55454

* Author: D.E. Akers
* Status:= Open
* Priority: Normal
* Assignee:
--------------------= --------------------
I propose that if we are able to conveniently g= rab one capture with this method, we ought to be able to grab more than o= ne. Still, there are some caveats worth considering:

* It shou= ld return an array, but every other =60=23=5B=5D=60 variant returns a str= ing or =60nil=60.
* Should the argument be an array, or should the m= ethod be variadic=3F
- Array argument looks a little =22noisy=22=3F= =60'123abc'=5B/(=5Cd+)(=5Cw+)/, =5B2, 1=5D=5D=60
- Variadic metho= d requires intrusive modification of internal calls to =60rb=5Fstr=5Fsubp= at()=60.
* Complementary =60=23=5B=5D=3D=60 would be crpytic, overly= complex, and likely go unused, but not adding it would break the symmetr= y.

I realize this is essentially an outline of why not to impl= ement this feature, but I figured I'd toss it out there for feedback. Tho= ughts=3F

---=46iles--------------------------------
strin= g=5Fslice=5Fmany=5Fcaptures.patch (906 Bytes)


--
h= ttps://bugs.ruby-lang.org/
--567387d6_7de67713_16c--