Using 'ruby' with no arguments freezes terminal

ruby

Solution

This is expected. When you run just `ruby`, it sits there, waiting for a program from STDIN, followed by an end-of-file character, after which it executes the program.

If you want interactive, like when you run `python`, you want Ruby's `irb`.

Problem

I'm a Ruby newbie and have Ruby 1.9.3 installed on an Ubuntu 12.04 machine. Whenever I run the `ruby` command in the terminal with no arguments, it just hangs and does nothing. It does the same thing on my Windows XP installation. Is this the expected behavior? Coming from a Python/Java background I expected some kind of output.

Original source