Commit 1c95f4eb authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #536 from nkshigeru/vc

avoid local variable declaration in the middle
parents f35d797e 9447e823
...@@ -1008,13 +1008,14 @@ mrb_bob_missing(mrb_state *mrb, mrb_value mod) ...@@ -1008,13 +1008,14 @@ mrb_bob_missing(mrb_state *mrb, mrb_value mod)
{ {
mrb_value name, *a; mrb_value name, *a;
int alen; int alen;
mrb_value inspect;
mrb_get_args(mrb, "o*", &name, &a, &alen); mrb_get_args(mrb, "o*", &name, &a, &alen);
if (!mrb_symbol_p(name)) { if (!mrb_symbol_p(name)) {
mrb_raise(mrb, E_TYPE_ERROR, "name should be a symbol"); mrb_raise(mrb, E_TYPE_ERROR, "name should be a symbol");
} }
mrb_value inspect = mrb_funcall(mrb, mod, "inspect", 0); inspect = mrb_funcall(mrb, mod, "inspect", 0);
if (RSTRING_LEN(inspect) > 64) { if (RSTRING_LEN(inspect) > 64) {
inspect = mrb_any_to_s(mrb, mod); inspect = mrb_any_to_s(mrb, mod);
} }
......
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