Skip to content

Instantly share code, notes, and snippets.

@cadwallion
Created April 6, 2012 03:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cadwallion/2316695 to your computer and use it in GitHub Desktop.
Save cadwallion/2316695 to your computer and use it in GitHub Desktop.
Array() shenanigans...
>> Array([])
=> []
>> Array(nil)
=> []
>> Array([{foo: 'bar'}])
=> [{:foo=>"bar"}]
>> Array([{foo: 'bar'}, {bar: 'baz'}])
=> [{:foo=>"bar"}, {:bar=>"baz"}]
>> Array({foo: 'bar'})
=> [[:foo, "bar"]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment