Skip to content

Commit

Permalink
ignore id to create NameError
Browse files Browse the repository at this point in the history
  • Loading branch information
matz committed Jun 18, 2012
1 parent 4f4965a commit 742c4fb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/error.c
Expand Up @@ -203,9 +203,8 @@ mrb_name_error(mrb_state *mrb, mrb_sym id, const char *fmt, ...)
n = 0;
}
argv[0] = mrb_str_new(mrb, buf, n);

argv[1] = mrb_str_new_cstr(mrb, mrb_sym2name(mrb, id));
exc = mrb_class_new_instance(mrb, 2, argv, E_NAME_ERROR);
argv[1] = mrb_symbol_value(id); /* ignore now */
exc = mrb_class_new_instance(mrb, 1, argv, E_NAME_ERROR);
mrb_exc_raise(mrb, exc);
}

Expand Down

0 comments on commit 742c4fb

Please sign in to comment.