On Mon, Aug 13, 2012 at 11:49 AM, ajay paswan <[email protected]> wrote: >> >> File.foreach('path/to/your/file').first >> > > What if I use: > > line = FasterCSV.foreach(filename).first > > giving the error: > Uncaught exception: no block given > :(
This should work: line = FasterCSV.to_enum(:foreach, filename).first Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ -- You received this message because you are subscribed to the Google Groups ruby-talk-google group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at https://groups.google.com/d/forum/ruby-talk-google?hl=en
