SHARE
TWEET

Untitled

a guest Jan 18th, 2019 46 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. irb(main):001:0> require 'pry'
  2. => true
  3. irb(main):002:0> pry
  4. [1] pry(main)> magic = Hash.new({})
  5. => {}
  6. [2] pry(main)> magic['bird'] = 'in the hat'
  7. => "in the hat"
  8. [3] pry(main)> magic.keys
  9. => ["bird"]
  10. [4] pry(main)> magic['watch']['closely'] = 'this is the trick'
  11. => "this is the trick"
  12. [5] pry(main)> magic.keys
  13. => ["bird"]
  14. [6] pry(main)> magic['out']['of nowhere'] = magic['watch']['closely']
  15. => "this is the trick"
  16. [7] pry(main)> magic.keys
  17. => ["bird"]
  18. [8] pry(main)> magic['out']['of nowhere']
  19. => "this is the trick"
  20. [9] pry(main)>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top