Skip to content
Browse files

Fixing Ruby code example on Associative Arrays

  • Loading branch information...
1 parent 4b2f0a9 commit 1c79396097da50f47f2914d0c5c27127c58d3c98 @williamn williamn committed with mnaberez
Showing with 4 additions and 3 deletions.
  1. +4 −3 array/array.markdown
View
7 array/array.markdown
@@ -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"}
}}

0 comments on commit 1c79396

Please sign in to comment.
Something went wrong with that request. Please try again.