Wim Vander Schelden wrote:
> On Sun, 8 Apr 2007 04:18:59 +0900
> Alex DeCaria <alex.decaria / millersville.edu> wrote:
> 
>> This results in
>> 
>> "false"
>> "true"
>> 
>> My question is, "Is this what's supposed to happen, or is this a bug?"
>> 
> 
> I think this is supposed to happen, as
> 
> :hi == 'hi'
> 
> also returns false.
> 
> Wim

Wim,

Thanks for responding.  The problem is that if you put a symbol into a 
non-TkVariable, such as

b = :hi

then it stays as a symbol, and

b == :hi returns "true", while b == "hi" is "false".

But if b is a TkVariable, then the opposite occurs.  This seems 
inconsistent.  I would expect that when I assign a symbol to a variable 
that it won't change to a string on me arbitrarilly.  But, there may be 
a good reason why it does this, and hopefully someone can explain why.

Alex

-- 
Posted via http://www.ruby-forum.com/.