Commit 9b1d9a79 authored by Jun Hiroe's avatar Jun Hiroe

Refactor mrb_f_array func

parent 4fd28def
#include "mruby.h"
#include "mruby/error.h"
#include "mruby/object.h"
#include "mruby/array.h"
/*
......@@ -45,7 +44,7 @@ mrb_f_array(mrb_state *mrb, mrb_value self)
tmp = mrb_check_convert_type(mrb, arg, MRB_TT_ARRAY, "Array", "to_a");
}
if (mrb_nil_p(tmp)) {
tmp = mrb_ary_new_from_values(mrb, 1, &arg);
return mrb_ary_new_from_values(mrb, 1, &arg);
}
return tmp;
......
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