代码和环境如下,File.read 只能输出到 1860 行。
RUBY VERSION: 2.2.0 (2014-12-25 patchlevel 0) [x86_64-linux]
class Debug
def initialize
file = File.new("debug.txt", "w+:UTF-8")
3000.times { |row| file.puts row }
puts File.read("debug.txt")
end
end
Debug.new