[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: nil's metatable
- From: David Jones <drj@...>
- Date: Tue, 4 Jul 2006 16:43:08 +0100
Let's assume I've given nil and metatable and in the examples below
made nil's metatable accessible via nilmt.
It seems that setting a __len metamethod for nil also affects other
types (eg, functions):
> nilmt.__len = function()return 7 end
> return #nil
7
> return #function()end
7
Now, I don't really have an excuse for poking around in this dark
corner, but...
is this intended?
drj