Use irb to acess ruby directly in the terminal
>> 100 + 32
=> 132Keep the terminal simple use --simple-prompt
| Operations | Example(s) | Comments |
|---|---|---|
| print "Hello" | puts adds a newline to the string it outpus if there isn't one at the end already; print doesn't. Print prints exctly what it's told to and leaves the cursor at the end. (Note: On some platforms, an extra line is automatically output at the end of a program.) p outputs an inspect string, which may contain extra information about what it's printing. |
Y