file contents was truncated

S

shaobo.li

Hi,

i've printed a 3102 lines text file,but why the top (about 893 lines)
contents was truncated ? only the left lines contents was printed
out.here is my code

io = open("c:/test.txt", "r+")
io.each_line {|line|
puts line
}

thanks for your help
 
A

Assaph Mehr

i've printed a 3102 lines text file,but why the top (about 893 lines)
contents was truncated ? only the left lines contents was printed
out.here is my code

io = open("c:/test.txt", "r+")
io.each_line {|line|
puts line
}

Silly, really, but what's the buffer size of your command prompt window?
 
S

shaobo.li

this results came from eclipse rdt plugin,yes in command promp window
all the contents was printed ,thanks for your hints :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top