------ art_26161_3772386.1199731423832 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline String#scan as you are calling the scan method of a string instance. String is known as the receiver. Dan On 1/7/08, Peter Bailey <pbailey / bna.com> wrote: > > Robert Klemme wrote: > > On 07.01.2008 19:06, Peter Bailey wrote: > >> > >> I get this from Ruby: > >> sizer.rb:10: undefined method `to_f' for [["5100"]]:Array > >> (NoMethodError) > > > > Your error is in using #scan (see the docs for details). > > > > This works better > > > > width nfo[/Image Width: ([0-9]{1,5})/, 1].to_f > > ... > > > > Cheers > > > > robert > > Thank you very much. Yes, that works perfectly. That whole square > bracket thing you use there is new to me. When you say "see the docs," > what should I look for? For "String#scan" or for Regex. . . .? > -- > Posted via http://www.ruby-forum.com/. > > ------ art_26161_3772386.1199731423832--