Hi -- On Wed, 16 May 2007, Logan Capaldo wrote: > On 5/16/07, Trans <transfire / gmail.com> wrote: >> >> >> On May 16, 5:44 am, "Sven Suska (enduro)" <sven71... / suska.org> wrote: >> > Subclassing alone would not be enough, to solve the problem above, >> > also, String#== and Symbol#== would have to be defined such that "a" == >> :a >> > And also #hash would have to be defined accordingly. >> > >> > Then you would still have the two different kinds of objects ("a" and :a) >> > but they would behave quite the same except for modifying methods. >> >> While I think Symbol probably could use at least few of String's >> manipulation methods, putting that aside, I wonder how it would effect >> things just to make :a == "a" ? >> > Well there is precendent, 2 == 2.0 and so on With symbols being as integer-like as they are string-like, though, it's really equally similar to: 2 == :"2" > On the other hand, what should happen in case statements? Maybe it > would acutally be better to make :a === 'a' but not :a == 'a' I guess as long as :a === :a was still true, that might be a good way to express the fact that "this is the string of which this symbol is a case", or something like that. David -- Q. What is THE Ruby book for Rails developers? A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) (See what readers are saying! http://www.rubypal.com/r4rrevs.pdf) Q. Where can I get Ruby/Rails on-site training, consulting, coaching? A. Ruby Power and Light, LLC (http://www.rubypal.com)