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
On the other hand, what should happen in case statements? Maybe it
would acutally be better to make :a === 'a' but not :a == 'a'