Gets and ARGV?

Code >

option = input[0]
values = input[1,input.length]

print '#Message:
i = gets

Active >

thinkwritemute@thinkwritemute-netbook:~/Dropbox/Public/Repositories/ruby/twt$
ruby twt.rb post
#Message: twt.rb:181:in gets': No such file or directory - post (Errno::ENOENT) from twt.rb:181:ingets’
from twt.rb:181:in `’

Kurtis Rainbolt-greene wrote:

thinkwritemute@thinkwritemute-netbook:~/Dropbox/Public/Repositories/ruby/twt$
ruby twt.rb post
#Message: twt.rb:181:in gets': No such file or directory - post (Errno::ENOENT) from twt.rb:181:in gets’
from twt.rb:181:in `’

If you wish to be certain to get input from stdin, use $stdin.gets

http://ruby-doc.org/core/classes/Kernel.html#M005955

-Justin