LWN.net Logo

Ruby 2.0.0 released

Ruby 2.0.0 released

Posted Feb 24, 2013 16:56 UTC (Sun) by imgx64 (guest, #78590)
In reply to: Ruby 2.0.0 released by tnoo
Parent article: Ruby 2.0.0 released

That's the old way of using keyword arguments. The new way, as the article points out:

# Ruby 2.0:
def cycle(first_value, *values, name: 'default')
  # ...
end


(Log in to post comments)

Ruby 2.0.0 released

Posted Feb 25, 2013 7:47 UTC (Mon) by tnoo (subscriber, #20427) [Link]

Ooops, you're correct, I read that article too hastily. In this case I'm glad to see sane syntax being used consistently.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds