raise TypeError instead of ArgumentError when argument of wrong type given to the values_at

parent c3aa436e
...@@ -392,7 +392,7 @@ mrb_get_values_at(mrb_state *mrb, mrb_value obj, mrb_int olen, mrb_int argc, con ...@@ -392,7 +392,7 @@ mrb_get_values_at(mrb_state *mrb, mrb_value obj, mrb_int olen, mrb_int argc, con
mrb_ary_push(mrb, result, mrb_nil_value()); mrb_ary_push(mrb, result, mrb_nil_value());
} }
} else { } else {
mrb_raisef(mrb, E_ARGUMENT_ERROR, "invalid values selector: %S", argv[i]); mrb_raisef(mrb, E_TYPE_ERROR, "invalid values selector: %S", argv[i]);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment