From: "Albert L. Wagner" Date: 2002-01-04T23:09:22+09:00 Subject: [ruby-talk:30215] Re: chomp for arrays? Philosophically, this sounds really wierd to me. You seem to want specific blocks to interate over a collecton automatically, but you want the blocks to meet your specific current needs. The logical end of such a thing is to have a language with a single instruction for each of your applications. dempsejn@georgetown.edu wrote: > > Hi Guy, > > Yeah, I realize its made for strings...but like the snippet Sean > posted, if it encounters types other than strings it would leave them > alone...is there any reason why this would be a bad idea to implement > internally? > > ----- Original Message ----- > From: ts > Date: Friday, January 4, 2002 4:23 am > Subject: [ruby-talk:30193] Re: chomp for arrays? > > > >>>>> "d" == dempsejn writes: > > > > d> I was wondering if there was a built-in for chomping an Array. > > I was > > d> going to write a little one liner to include in various places, > > but it > > d> seems like it'd be useful to have chomp be able to accept an > > array as > > d> well. Has there been any discussion on this or reasons not to? > > > > Well, actually chomp is defined as a method of String or a global > > function. What do you do if the array contain something other > > than a > > String ? > > > > > > > > Guy Decoux > > -- "It requires wisdom to understand wisdom: the music is nothing if the audience is deaf." - Walter Lippman