Ruby quiz (intermediate) #3

question mark

Question

We are familiar with Hash.new in order to define a Hash. What are the 2 other ways to initialize a Hash?

Solution

See Ruby doc on Hash.new for more info. Thanks to this post from Ilya Grigorik for the inspiration!

Advertisements

Got a comment?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: