From: Trans Date: 2008-09-07T21:48:30+09:00 Subject: #to_self Say I have a mixin: module Grumpy def grumpize to_s.upcase + '!!!!!!!!!' end end class String include Grumpy end "fun".grumpize #=> "FUN!!!!!!!!!" Now, class Symbol include Grumpy end :fun.grumpize #=> "FUN!!!!!!!!!" But, hey, I want a Grumpy Symbol here, not a String! I don't want to have to make a mixin exception for Symbol. So what's a general solution? My considerations of this led to: class String alias_method :to_self, :to_s end class Symbol alias_method :to_self, :to_sym end module Grumpy def grumpize (to_s.upcase + '!!!!!!!!!').to_self end end That does the trick. And more besides, #to_self seems interesting in and of itself. Would #to_self be generally useful throughout Ruby's Object models? What else could be done with it, I wonder? T.