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

closed
kimura wataru
5
2009-09-23
2009-09-03
Johan Lundström
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

  • Example

     
    Attachments
    • labels: --> unexpected behavior
     
  • kimura wataru
    kimura wataru
    2009-09-23

    • assigned_to: nobody --> kimuraw
    • status: open --> closed