Logo

Programming-Idioms

History of Idiom 8 > diff from v25 to v26

Edit summary for version 26 by :
[Ruby] newer syntax

Version 25

2016-02-18, 16:57:56

Version 26

2016-04-13, 19:35:20

Idiom #8 Initialize a new map (associative array)

Declare a new map object x, and provide some (key, value) pairs as initial content.

Idiom #8 Initialize a new map (associative array)

Declare a new map object x, and provide some (key, value) pairs as initial content.

Code
x = {"one" => 1, "two" => 2}
Code
x = {one: 1, two: 2}