Expected. When you run only ruby , it sits there, waiting for the program from STDIN, followed by the end-of-file character, after which it launches the program.
If you want to work in interactive mode, for example, when starting python , you need Ruby irb .
source share