check length before calling stack_copy(); based on a patch from @mirich; close #2129
Merge branch 'master' of github.com:mruby/mruby