From: Chad Perrin Date: 2011-08-10T05:00:00+09:00 Subject: Re: *WHY* does this not work? --17pEHd4RhPHOinZp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 10, 2011 at 04:49:13AM +0900, Josh Cheek wrote: >=20 > It has been pointed out several times that Array#map! does this. >=20 > In your case, though, it looks like you'd prefer Array#reject! >=20 > def strip_python_loads > @file_lines.reject! { |line| line =3D~ /\s*from[ A-Za-z0-9\_.]*import\s= *\w*/ > } > end I should have thought of that. I'd probably use do . . . end rather than braces for that, though. The line's just too long to be comfortable this way. --=20 Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] --17pEHd4RhPHOinZp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk5BjaEACgkQ9mn/Pj01uKVlZACgrOMCeG5Hl9HMeQsESd1+Keq+ bkEAoMeiV+U6fVYELrcZdTqn1w9c68xq =9U9g -----END PGP SIGNATURE----- --17pEHd4RhPHOinZp--