1. Computing
Michael Morin

New to Ruby 2.0: Keyword Arguments

By November 27, 2012

Follow me on:

"Wait," you say, "I'm sure I've seen keyword arguments in Ruby before!"  But no, you haven't.  Or you have, depending on how you look at it.  The Ruby developers hacked in something like keyword arguments in the form of naked hash key/value pairs in method invocations, but it's not "real" keyword arguments.  There are real limitations in how this type of hash hack can work.  But, as you'll see, the new keyword argument feature in Ruby 2.0 is much better than the old hacked in "keyword arguments."

No comments yet. Leave a Comment
Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2014 About.com. All rights reserved.