Gets and ARGV?

Code >

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

print '#Message:
i = gets

Active >

[email protected]:~/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:

[email protected]:~/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 `’

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

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

-Justin

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs