def n_archivo(file) file1 = File.open("Text.txt") file1lines = f1.readlines.map(&:chomp) puts file1lines.inspect end n_archivo("Text.txt")
Standard input is empty
Standard output is empty
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>'