From: "超群李" Date: 2006-04-20T11:31:52+09:00 Subject: Re: Learning Ruby ------=_Part_1322_23117644.1145500308999 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline I don't know the syntax.But I think it is same as [1,2,3].all? {|i| i.positive?} On 4/20/06, Jesse M wrote: > > Dave Burt wrote: > > Jesse M wrote: > >> Okay I've went through Chris Pines tutorial on > >> programming(http://pine.fm/LearnToProgram/), and I still don't fully > >> understand what I hear from experienced Ruby programmers. Is there an= y > >> other tutorials that you might spare for a newbly soul such as mine? > > > > What don't you understand? > > > > Cheers, > > Dave > > Well I see something like, > > lass Numeric > def positive? > self > 0 > end > end > > [1, 2, 3].all? &:positive? =3D> true > [-1, 2, 3].all? &:positive? =3D> false > > which i don't understand half of it :) and i'm really gung hoe about it! > > -- > Posted via http://www.ruby-forum.com/. > > -- Chaoqun Li ThoughtWorks(Xi'an) mobile phone:13909217679 office phone:029-87607341 ------=_Part_1322_23117644.1145500308999--