fork download
  1. def n_archivo(file)
  2.  
  3. file1 = File.open("Text.txt")
  4. file1lines = f1.readlines.map(&:chomp)
  5. puts file1lines.inspect
  6. end
  7. n_archivo("Text.txt")
  8.  
Runtime error #stdin #stdout #stderr 0s 28688KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
prog.rb:3:in `initialize': No such file or directory @ rb_sysopen - Text.txt (Errno::ENOENT)
	from prog.rb:3:in `open'
	from prog.rb:3:in `n_archivo'
	from prog.rb:7:in `<main>'