Advertisement
Guest User

Untitled

a guest
May 25th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. [4] pry(main)> greeting("Hon")
  2. Hon is your name.
  3. => nil
  4. [5] pry(main)> funtime = []
  5. => []
  6. [6] pry(main)> funtime.push "super"
  7. => ["super"]
  8. [7] pry(main)> funtime.push "one", "two", "three"
  9. => ["super", "one", "two", "three"]
  10. [8] pry(main)> funtime.each {}
  11. => ["super", "one", "two", "three"]
  12. [9] pry(main)>
  13. [10] pry(main)> funtime.each {|i| puts "This is fun: #{i}!"}
  14. This is fun: super!
  15. This is fun: one!
  16. This is fun: two!
  17. This is fun: three!
  18. => ["super", "one", "two", "three"]
  19. [11] pry(main)> include Math
  20. => Object
  21. [12] pry(main)> sqrt 64
  22. => 8.0
  23. [13] pry(main)>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement