3 ms·
Return is absolutely a keyword in Ruby: http://www.ruby-doc.org/docs/keywords/1.9/files/keywords_rb.html#M000032 http://www.ruby-doc.org/docs/keywords/1.9/files
by gcampbell 15y ago
Return is absolutely a keyword in Ruby: http://www.ruby-doc.org/docs/keywords/1.9/files/keywords_rb.html#M000032 http://www.ruby-doc.org/docs/keywords/1.9/files/keywords_rb....
- ladyrassilon 15y agoIts a keyword, but its not needed (as its not needed in many modern languages) but many rubyists I've worked with said that it was a nice feature that the return keyword was unnecessary and did not use it.
- masklinn 15y ago> but its not needed Depends. It's needed for non-local returns (returning from within blocks), and it's also useful for early returns within methods. It's not needed for the final return of a method, or a normal exit from a block (not a bad thing in my opinion, and Python's lambda do the same)