The goal of this code is to make a grid that is infinitely large by creating a new row whenever one is asked for (via the __index metamethod).
When I ask for a row from the board I do get a row, but it doesn't save it -- if I ask for the same row number, I don't get the same row table out.
local board = {};
setmetatable(board, {__index = function(row)
local t = {};
board[row] = t;
return t;
end});
board[0][0] = true;
assert(board[0] == board[0], "inconsistent");
-- This assert fails, so that means board[0] is NOT the
-- same thing as board[0]
-- Why?
assert(board[0][0] == true, "(0, 0) not set");
-- (This one also fails, for the same reason, probably)
Code partially works. asserts fail, but I can't see why.
I'm obviously missing something here.

3 comments
To me, it may be line 10 (I don't remember anything about 'assert' or 'metatable's anymore, so sorry if this doesn't help :( ), because it appears your comparing 'board[0]' to itself, although, I'm not too sure if this is the problem.
assertchecks if you gave ittrue. You can use it to make sure you're staying sane. In this case, it errors, becauseboard[0]in fact is NOTboard[0], which is the problem I'm running into@Alpha; it means the metamethod is firing twice in that statement, when it shouldn't be firing at all due to line 8.