Hmm, not sure what you are missing, seems fine to me.
irb(main):001:0> f = File.new('test.txt')
=> #<File:test.txt>
irb(main):002:0> f.each_line do |line|
irb(main):003:1*   w = line.split(' ')
irb(main):004:1>   puts w
irb(main):005:1> end
First
Second
Third
=> #<File:test.txt>

My file had First, Second and Third on separate lines.

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to