rvirding/luerl — pull request #16 by lastcanal (2013-01-11 23:35:31+00:00)
Title: Decode returned tables for eval/2 and evalfile/2

When using `luerl:eval/2` to return a table you get a `#tref` but no Lua state to extract it from. This patch will decode the return values of `eval/2` and `evalfile/2` before the Lua state that contains the `#tref` is thrown away.

> luerl:eval("return { hello='there', ['how are']='you', 'well' }", Lua).
{ok,[[{1,<<"well">>},
{<<"hello">>,<<"there">>},
{<<"how are">>,<<"you">>}]]}