From: thunk Date: 2010-03-31T09:30:09+09:00 Subject: Re: return number of spaces at the beginning of a line Adding a '+' method to Kernel for symbols would reduce code clutter but still ultimately end up requiring conversion from symbols to strings to do the append operation, right? (ruby 1.9 is allowing me to do more with the ?! chars than I think I remember 1.8 where I think I remember getting some errors around this. ) I would not normally care much, or feel a particular need to understand what is going on under the hood, but I have a performance issue right here and this happens be one of the things I'm working on. comments? then, what would be the best form to add two symbols together (ending up with a symbol again) quick check: sym1, sym2= :abc_defg?, sym2 = :xyz puts (sym1 + sym2).to_s =>
': undefined method `+' for :abc_defg?:Symbol (NoMethodError)