lua-matrix icon indicating copy to clipboard operation
lua-matrix copied to clipboard

Lua 5.3 compatibility

Open apdougla opened this issue 7 years ago • 1 comments

For compatibility with lua 5.3.5, please consider making the following changes:

diff -rw lua-matrix-master lua-matrix-master-5.3.5

diff -rw lua-matrix-master/lua/matrix.lua lua-matrix-master-5.3.5/lua/matrix.lua

1042c1042

< mtx[i][j] = tonumber( loadstring( "return "..m1[i][j][1] )() )

---

> mtx[i][j] = tonumber( load( "return "..m1[i][j][1] )() )

diff -rw lua-matrix-master/samples/fit.lua lua-matrix-master-5.3.5/samples/fit.lua

33c33

< return unpack( tres )

---

> return table.unpack( tres )

diff -rw lua-matrix-master/test/test_complex.lua lua-matrix-master-5.3.5/test/test_complex.lua

17,18c17,18

< assert( tostring( complex '-10.2e2' ) == '-1020' )

< assert( tostring( complex '-10.2E+02' ) == '-1020' )

---

> assert( complex.tostring( complex('-10.2e2'), '%.0f' ) == '-1020' )

> assert( complex.tostring( complex('-10.2E+02'), '%.0f' ) == '-1020' )

apdougla avatar Dec 06 '18 13:12 apdougla

ow this hurts my eyes

bachp2 avatar Jun 23 '19 02:06 bachp2