Durga_B
(Durga B.)
1
In cmdline.rb file:
puts ARGV[0]
puts "Enter a no "
val =gets.chomp.to_i()
Come to command prompt
Go to taht file path>cmdline.rb prasad
cmdline.rb:15:in`gets`:no such file or directory-prasad(Errorno::ENOENT)
from cmdline.rb
···
--
Posted via http://www.ruby-forum.com/.
the regular "gets" opens & reads ARGV[0], if given. Use $stdin.gets
instead.
···
On Mon, 2010-11-29 at 21:01 +0900, Durga B. wrote:
In cmdline.rb file:
puts ARGV[0]
puts "Enter a no "
val =gets.chomp.to_i()
Come to command prompt
Go to taht file path>cmdline.rb prasad
cmdline.rb:15:in`gets`:no such file or directory-prasad(Errorno::ENOENT)
from cmdline.rb