From: murphy Date: 2007-12-13T16:39:45+09:00 Subject: Re: redefineable not operator Yukihiro Matsumoto wrote: > This case, it's more than having two names. Those two should act > identical. But I understand your concern. Let me think about it. while we're at it: - why does Symbol.all_symbols return :"!" twice? - is there a way to print a list of all Symbol equivalence classes with more than one member? I have found: :"+" == :"+(binary)" # => true :"+@" == :"+(unary)" # => true :"-" == :"-(binary)" # => true :"-@" == :"-(unary)" # => true :"~" == :"~@" # => true :"~" == :"~(unary)" # => true :"~@" == :"~(unary)" # => true :"!" == :"!@" # => true :"!" == :"!(unary)" # => true :"!@" == :"!(unary)" # => true # and the way around: :"+(binary)" == :"+" # => true :"+(unary)" == :"+@" # => true :"-(binary)" == :"-" # => true :"-(unary)" == :"-@" # => true :"~@" == :"~" # => true :"~(unary)" == :"~" # => true :"~(unary)" == :"~@" # => true :"!@" == :"!" # => true :"!(unary)" == :"!" # => true :"!(unary)" == :"!@" # => true (Ruby 1.9 _and_ 1.8, surprisingly.) is this complete? - what determines the "real" value of a symbol (that I get when inspecting or printing it)? is it a rule that the shortest variant always wins? :"+" # => :+ :"+@" # => :+@ :"-" # => :- :"-@" # => :-@ :"~" # => :~ :"~" # => :~ :"~@" # => :~ :"!" # => :"!" :"!@" # => :"!" :"+(binary)" # => :+ :"+(unary)" # => :+@ :"-(binary)" # => :- :"-(unary)" # => :-@ :"~@" # => :~ :"~(unary)" # => :~ :"!@" # => :"!" :"!(unary)" # => :"!" [murphy]