Actions
Bug #7771
closedmethod 'gets' crashed
Description
method 'gets' crashed when pass arguments like "ruby test.rb hello"
example
#file test.rb only one method
gets
#end
type "ruby test.rb" and enter will work well
but "ruby test.rb hello" will crash
In my machine(ubuntu 32):
ruby test.rb hello
test.rb:1:in gets': No such file or directory - hello (Errno::ENOENT) from test.rb:1:in
gets'
from test.rb:1:in `'
Updated by Anonymous almost 12 years ago
- Subject changed from method 'gets' crashed to method 'gets' crashed
=begin
This is by design, (({gets})) will read from (({ARGV})) by default. If you want to read from the standard input even if there is a command line argument, use:
$stdin.gets
=end
Updated by Anonymous almost 12 years ago
- Status changed from Open to Rejected
Actions
Like0
Like0Like0