Navigation Menu

Skip to content

Commit

Permalink
Fixing Ruby code example on Associative Arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
williamn authored and mnaberez committed Nov 10, 2010
1 parent 4b2f0a9 commit 1c79396
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions array/array.markdown
Expand Up @@ -56,10 +56,11 @@ object if you need an ordered collection.
// => array('age' => 26, 'name' => 'Joe', 'country' => 'USA')
}}


{{code:ruby
$array = array('age' => 26, 'name' => 'Joe', 'country' => 'USA');
var_export($array);
// => array('age' => 26, 'name' => 'Joe', 'country' => 'USA')
hash = {:age => 26, :name => "Joe", :country => "USA"}
p hash
# => {:name=>"Joe", :age=>26, :country=>"USA"}
}}


Expand Down

0 comments on commit 1c79396

Please sign in to comment.