RubyFlow The Ruby and Rails community linklog

A trick with Ruby Hash.new

Hashes are used a lot in Ruby (sometimes even abused) and they have a very interesting functionality that is rarely used: Hash.new has 3 different forms

Want to know more? Go check https://dev.to/factorial/a-trick-with-ruby-hash-new-2ma0

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in