#55 NSStrings can't be used for hash-keys

closed
5
2009-09-23
2009-09-03
No

Because NSString don't implement method "hash", see documentation for Object#hash and Hash (http://apidock.com/ruby/Object/hash and http://apidock.com/ruby/Hash\).
I've provided an example that show's the problem both with hash-objects and when using uniq-method in an array containing NSStrings.

This isn't how regular Ruby-strings work at least.

Discussion

  • Johan Lundström

    • labels: --> unexpected behavior
     
  • kimura wataru

    kimura wataru - 2009-09-23
    • assigned_to: nobody --> kimuraw
    • status: open --> closed
     

Log in to post a comment.