16 Feb '13, 1pm

Вот этот топик прояснил проблему: надо использовать $stdin.gets вместо gets.

I am running into an issue where I have a script that takes two command line arguments and reads from stdin. It seems that gets is not getting to stdin because it is hitting ARGV first (http://www.ruby-doc.org/core/classes/Kernel.html#M005996 ). Is there a way around this so that I can pass in arguments and listen on stdin as well. Running the script without args works perfectly. What I am doing currently looks something like the following: var1 = ARGV[0] var2 = ARGV[1] var3 = gets Any advice would be helpful. Thanks. -Joe

Full article: http://www.ruby-forum.com/topic/185266

Tweets

'Hydrogen Future' Gets A Second Look: While fuel cells powered by very pure hydrogen gas can solve some of the p...

'Hydrogen Future' Gets A Second Look: While fue...

evworld.com 16 Feb '13, 4pm

PHOTO CAPTION: General Motors Equinox SUV fuel cell demonstrator, one of several in operation in Hawaii. 'Hydrogen Future'...