rvirding/luerl — pull request #38 by loucash (2014-05-13 09:20:24+00:00)
Title: Handle table key nil

In Lua manual, section 2.1 we have:

_The type table implements associative arrays, that is, arrays that can be indexed not only with numbers, but with any Lua value except nil and NaN (Not a Number, a special numeric value used to represent undefined or unrepresentable results, such as 0/0)._

Lua error looks like this:

```lua
> t={}
> t[nil]=1
> stdin:1: table index is nil
stack traceback:
stdin:1: in main chunk
[C]: in ?
```

Luerl error, with this patch, looks like this:

```erlang
1> luerl:do("t={}\n t[nil]=4").
** exception error: {lua_error,{illegal_index,{tref,12},nil}, _}
```

(well, _NaN_ is also missing, but that is whole other story)