From: Niko Schwarz Date: 2001-10-21T02:47:31+09:00 Subject: [ruby-talk:22841] Re: array prob ts wrote: > N> | a = a.sort { |a, b| > ^ ^ > | | > > N> thats the first problem. what you see is a workaround, but i dont get > why N> a.sort! { bla... > N> doesnt work. > > because you re-use `a' as a parameter for the block, change the name > something like > > a.sort! { |x, y| ... } thats exactly the problem. if i do that, it wont work anymore. > a.map! replace the value with the result returned by the block, in your > case this is the value returned by #upto ouch! yea, i was *quite* stupid, and this took me so long *uaaaaah!* thanks for your help =) regards, nick -- Don't worry about avoiding temptation -- as you grow older, it starts avoiding you. -- The Old Farmer's Almanac