Guest User

Untitled

a guest
Jun 18th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. h = ActiveSupport::OrderedHash.new
  2. h['one'] = '1'
  3. h['two'] = '1'
  4. h['three'] = '1'
  5.  
  6.  
  7. h.find_all { true }
  8. => [["one", "1"], ["two", "1"], ["three", "1"]]
  9.  
  10.  
  11. h.select { true }
  12. => {"one"=>"1", "two"=>"1", "three"=>"1"}
Add Comment
Please, Sign In to add comment