Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.

Chaining Statements Together
Using characters to separate commands in Ruby is unnecessary, unless we want to chain multiple statements together on a single line. In this case, a semicolon (;) is used as the separator. However, if you put every statement on its own line (as we've been doing until now), the semicolon is completely optional. If you chain multiple statements together in the interactive shell, only the output of the last command that was executed will be displayed to the screen:

irb> fox.class; fox.length; fox.upcase


Don't be confused. All the messages were sent and methods executed, but irb only shows us the last one.

If you want to change selection, open original toplevel document below and click on "Move attachment"


statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on



Do you want to join discussion? Click here to log in or create user.