Guest User

Untitled

a guest
Feb 18th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. File: about_hashes.rb
  2. Line: 4
  3. def test_creating_hashes
  4. empty_hash = Hash.new
  5. assert_equal {}.class, empty_hash.class // here's the issue
  6. assert_equal({}, empty_hash)
  7. assert_equal 0, empty_hash.size
  8. end
  9.  
  10. When run i get after the great ascii art:
  11. path_to_enlightenment.rb:10:in `require': ./about_hashes.rb:6: syntax error, unexpected '\n', expecting tCOLON2 or '[' or '.' (SyntaxError)
  12. from path_to_enlightenment.rb:10
  13. macmac:01.koans borjo$
  14. macmac:01.koans borjo$ ruby --version
  15. ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin10.0]
  16. macmac:01.koans borjo$
Add Comment
Please, Sign In to add comment