From: Louis-Pierre Dahito Date: 2009-01-14T23:05:39+09:00 Subject: Re: Trying to parse an array of rss feeds without success badboy wrote: > Louis-pierre Lp.dahito schrieb: >> def initialize >> b = Site.new >> require 'rss/2.0' >> >> method each in global.rb at line 38 >> at top level in global.rb at line 38 >> Program exited. >> >> I need help even though it's a pretty basic question... >> >> Thank you guys... > the error message has all you need to get rid of this mistake. > "...for #" > > Now start irb and type something like: > irb> myarray = [1,2,3] > irb> newarray = myarray.each { |i| i * 10 } > irb> p newarray > do you see it? > now try Array#map: > irb> myarray = [1,2,3] > irb> newarray = myarray.map { |i| i * 10 } > irb> p newarray > > see the difference? I do see the difference... Thank a lot you fixed my problem... I thought that the each iterator would do the exact same thing the map method did... Anyway thank you very much for your time :) -- Posted via http://www.ruby-forum.com/.