From: Dominik Honnef Date: 2009-02-21T03:34:09+09:00 Subject: Re: String#include? with several possibilities? --a8Wt8u1KmwUX3Y2C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On [Sat, 21.02.2009 03:24], Aldric Giacomoni wrote: > Is that possible with a built-in method? string =3D "The quick brown fox jumps over the lazy dog" ["random", "quick", "another random"].any? { |e| string.include? e} # =3D> = true ["random", "foo", "another random"].any? { |e| string.include? e} # =3D> fa= lse --=20 Dominik Honnef dominikho@gmx.net --a8Wt8u1KmwUX3Y2C Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkme94EACgkQePZ2jI1LDtfthACgt5s4FnZKeh4Kbs2ZQWgVa312 F/8Anj64hzxIKuvu3DQgcSIyduA5g5jX =PT49 -----END PGP SIGNATURE----- --a8Wt8u1KmwUX3Y2C--