From: Charles Oliver Nutter Date: 2006-10-19T13:14:10+09:00 Subject: Re: Symbol < String in Ruby > 1.8 Charles Oliver Nutter wrote: > 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 Even better, compare to the current complete list of methods for Symbol in 1.9 (pre Symbol < String): === all_symbols dclone id2name inspect to_i to_proc to_s to_sym to_yaml yaml_new So Symbol will have these and the methods above? Why? -- Charles Oliver Nutter, JRuby Core Developer headius@headius.com -- charles.o.nutter@sun.com Blogging at headius.blogspot.com