dblack / wobblini.net wrote:
> I wonder whether:
> 
>      module Textual
>      end
> 
>      class String
>        include Textual
>      end
> 
>      class Symbol
>        include Textual
>      end
> 
> would make sense.

I sure think it does. Perhaps

module M17N # or Multilingual
# - expects there be a way to access bytes in the including class
# - implements M17N methods based on that collection of bytes
end

This seems to be the only purpose for Symbol < String.

Does Symbol need or will it even work with the following String methods?

<<   =~   []   []=   capitalize   capitalize!   casecmp   center   chomp 
   chomp!   chop   chop   chop!   chop!   chr   clear   concat   count 
  crypt   delete   delete   delete!   delete!   downcase   downcase! 
each   each_byte   each_char   each_line   empty?   end_regexp   eql? 
gsub   gsub!   hash   hex   include?   index   initialize_copy   insert 
   inspect   intern   is_binary_data?   is_complex_yaml?   jcount 
jlength   jsize   kconv   length   ljust   lstrip   lstrip!   match 
mbchar?   new   next   next!   oct   ord   quote   replace   reverse 
reverse   reverse!   reverse!   rindex   rjust   rstrip   rstrip!   scan 
   size   slice   slice!   split   squeeze   squeeze   squeeze! 
squeeze!   strip   strip!   sub   sub!   succ   succ   succ!   succ! 
sum   swapcase   swapcase!   to_f   to_i   to_s   to_str   to_sym 
to_yaml   tr   tr   tr!   tr!   tr_s   tr_s   tr_s!   tr_s!   unpack 
upcase   upcase!   upto   yaml_new

There are only a few String methods that even seem applicable to Symbol. 
I removed them and most of the m17n methods too. However none of the 
bang methods will work with Symbol, and most of the others don't really 
make sense (an is_complex_yaml Symbol? reversing a Symbol? why?)

-- 
Charles Oliver Nutter, JRuby Core Developer
headius / headius.com -- charles.o.nutter / sun.com
Blogging at headius.blogspot.com