From: Chad Perrin Date: 2010-09-26T08:34:07+09:00 Subject: Re: bug in gsub(?) --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 26, 2010 at 07:08:13AM +0900, Brian Candler wrote: >=20 > Take a suggestion from me: save your sanity and use the block form=20 > instead :-) >=20 > >> puts "\\:{}=3D#~".gsub(/([\\\:\~\=3D\#\{\}])/) { "\\#{$1}" } > \\\:\{\}\=3D\#\~ > =3D> nil I've wondered for quite a while what was the rationale for having \1 in the first place. --=20 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] --UlVJffcvxoiEqYs2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAkyehfYACgkQ9mn/Pj01uKVSYQCguB/VHaLvvK1qFYQ2Wxux8iux KYAAoJuu88tAUQRHes1QNC/6Yr7iSocK =kNIM -----END PGP SIGNATURE----- --UlVJffcvxoiEqYs2--