[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: == mystery
- From: spir <denis.spir@...>
- Date: Sun, 27 Dec 2009 14:10:09 +0100
test case:
require "lunichar"
print (UniChar.equals == getmetatable(UniChar).__eq)
print ()
uc1 = UniChar(255)
-- compare using equals()
print (uc1:equals(UniChar(255)))
print (uc1:equals(255))
-- compare using ==
print (uc1 == UniChar(255))
print (uc1 == 255)
--> output:
true
true
true
true
false
??? Não entendo... Seems equals() is not called in last case.
Denis
PS: Is there a way to avoid newline at end of print()?
________________________________
la vita e estrany
http://spir.wikidot.com/