[m-rev.] for review: fix problems with array.shrink/3

Peter Wang novalazy at gmail.com
Mon Nov 12 11:27:27 AEDT 2018


On Thu, 8 Nov 2018 13:56:09 +0000 (UTC), Julien Fischer <jfischer at opturion.com> wrote:
> 
> For review by anyone.
> 
> This fixes the issue marked JJJ in my previous commit.
> 
> --------------------------
> 
> Fix problems with array.shrink/3.
> 
> The behaviour of array.shrink/3 was not defined if its first argument was
> negative.  If this occurred, the C backends would return an empty array, while
> the non-C backends would abort.  This diff changes the behaviour of shrink/3 so
> that it throws an exception if its first argument is negative.

Please make a similar change for array.resize, in a separate change if
you like. The diff looks fine.

Peter


More information about the reviews mailing list