--nextPart1314046.ZKGM57nK0N Content-Type: text/plain; charset so-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Quoth Peñá, Botp: > Eric wrote: > > a3 = a1.select { |e| a2.include?(e) } > > > > compare: > a3 = a1.select { |e| e.in? a2} > > the latter is more straightforward. the former expression rocks my brain from left to right. > > Can we see light for #in? in ruby2? (just asking since december is near :) and i do not see it in mauricio's eigenclass site either) > > kind regards -botp Array#include? arr = [:sym, 'str'] # => [:sym, 'str'] arr.include? :sym # => true HTH, -- Konrad Meyer <konrad / tylerc.org> http://konrad.sobertillnoon.com/ --nextPart1314046.ZKGM57nK0N Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQBHDGXICHB0oCiR2cwRAhmsAJ9jekur8L9zEEPHhe1Lvn0/e86sQwCeNac0 PNof+aV6HT3Gx42k6MYj68sßÍS -----END PGP SIGNATURE----- --nextPart1314046.ZKGM57nK0N--