Hi, so I'm not clear with what lineno does. I'm trying to print the number
of lines in the file 'testfile'. However it says. "Undefined method
'lineno' for 105:Fixnum (NoMethodError)


Can someone help me out with that? This is what I've written. Please
forgive my ignorance.

fo = File.open("testfile.odt", "w") do |file|
file.write("So basically we're just testing this motherfucking thing. This
is the second line. And this is the third.")
end



line = fo.lineno


puts line


-- 
Himel Sarkar,
*himelsarkarforever.blogspot.com <http://himelsarkarforever.blogspot.com>*



* Here's to the crazy ones. The misfits. The rebels. The troublemakers. The
round pegs in the square holes. The ones who see things differently.
They're not fond of rules. And they have no respect for the status quo. You
can quote them, disagree with them, glorify or vilify them. About the only
thing you can't do is ignore them. Because they change things. They push
the human race forward. And while some may see them as the crazy ones, we
see genius. Because the people who are crazy enough to think they can
change the world are the ones who do.*