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.
Example
I fixed this problem at trunk r2263.
http://rubycocoa.svn.sourceforge.net/viewvc/rubycocoa?view=rev&revision=2263
you can use this code before next RubyCocoa release
----
module OSX
class NSString
def hash
oc_hash
end
end
end
------