8.2 -- [Incompatibilities in the Libraries]
- The function
print
does not calltostring
to format its arguments; instead, it has this functionality hardwired. You should use__tostring
to modify how values are printed. - The pseudo-random number generator used by the function
math.random
now starts with a somewhat random seed. Moreover, it uses a different algorithm. - By default, the decoding functions in the
utf8
library do not accept surrogates as valid code points. An extra parameter in these functions makes them more permissive. - The options "
setpause
" and "setstepmul
" of the functioncollectgarbage
are deprecated. You should use the new option "incremental
" to set them. - The function
io.lines
now returns four values, instead of just one. That can be a problem when it is used as the sole argument to another function that has optional parameters, such as inload(io.lines(filename, "L"))
. To fix that issue, you can wrap the call into parentheses, to adjust its number of results to one.