Permalink
Browse files

Should not unshare env stack repeatedly; fix #3601

  • Loading branch information...
matz committed Apr 12, 2017
1 parent 2a4db1a commit 0fb05eb55f881b3508584cb3b199bddd37dc8825
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/vm.c
View
@@ -260,6 +260,7 @@ mrb_env_unshare(mrb_state *mrb, struct REnv *e)
mrb_value *p = (mrb_value *)mrb_malloc(mrb, sizeof(mrb_value)*len);
ptrdiff_t cioff = e->cioff;
if (!MRB_ENV_STACK_SHARED_P(e)) return;
MRB_ENV_UNSHARE_STACK(e);
if (!e->c) {
/* save block argument position (negated) */

0 comments on commit 0fb05eb

Please sign in to comment.