Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Incorporate feedback from Dave Aronson

  • Loading branch information...
commit ef3ea9d3aee39eb9b1dc3d7a898078af07f73ebd 1 parent 7160342
Josh Cheek authored
4 cheatsheets/arrays.rb
@@ -176,10 +176,10 @@ def inspect
176 176 [3, 4, 13, 2, -3, 7].max # => 13
177 177 [3, 4, 13, 2, -3, 7].min # => -3
178 178
179   - # union
  179 + # intersection
180 180 [1,3,4] & [0,3,4,5] # => [3, 4]
181 181
182   - # intersection (order is not guaranteed)
  182 + # union (order is not guaranteed)
183 183 [1,3,4] | [0,3,4,5] # => [1, 3, 4, 0, 5]
184 184
185 185 # convert each element to a string, and join them together
4 cheatsheets/hashes.rb
@@ -121,8 +121,8 @@
121 121 hash.index(200) # => "b" # !> Hash#index is deprecated; use Hash#key
122 122 hash.index(999) # => nil # !> Hash#index is deprecated; use Hash#key
123 123
124   -# swap keys with values values
125   -hash = { :n => 1, :m => 1, :o => 2 } # n and m have the same value, m ends up getting squashed
  124 +# swap keys with values
  125 +hash = { :n => 1, :m => 1, :o => 2 } # n and m have the same value, n ends up getting squashed
126 126 hash.invert # => {1=>:m, 2=>:o}
127 127
128 128 # convert to an array
2  cheatsheets/rubygems.rb
@@ -4,7 +4,7 @@
4 4
5 5
6 6 # ===== How To Install =====
7   -# When you find one there that you are interested in, ie BlueCloth, a gem to parse markdown and output html
  7 +# When you find one there that you are interested in, e.g. BlueCloth, a gem to parse markdown and output html
8 8 # http://rubygems.org/gems/bluecloth
9 9 # It will give you instructions on how to install it
10 10 # $ gem install bluecloth

0 comments on commit ef3ea9d

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