Commit 9f7651fa authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2234 from suzukaze/refactor

Refactor functions in kernel.c
parents 434f0a6d d973bcff
......@@ -93,24 +93,18 @@ static mrb_value
mrb_obj_equal_m(mrb_state *mrb, mrb_value self)
{
mrb_value arg;
mrb_bool eql_p;
mrb_get_args(mrb, "o", &arg);
eql_p = mrb_obj_equal(mrb, self, arg);
return mrb_bool_value(eql_p);
return mrb_bool_value(mrb_obj_equal(mrb, self, arg));
}
static mrb_value
mrb_obj_not_equal_m(mrb_state *mrb, mrb_value self)
{
mrb_value arg;
mrb_bool eql_p;
mrb_get_args(mrb, "o", &arg);
eql_p = mrb_equal(mrb, self, arg);
return mrb_bool_value(!eql_p);
return mrb_bool_value(!mrb_equal(mrb, self, arg));
}
/* 15.3.1.3.2 */
......@@ -126,12 +120,9 @@ static mrb_value
mrb_equal_m(mrb_state *mrb, mrb_value self)
{
mrb_value arg;
mrb_bool equal_p;
mrb_get_args(mrb, "o", &arg);
equal_p = mrb_equal(mrb, self, arg);
return mrb_bool_value(equal_p);
return mrb_bool_value(mrb_equal(mrb, self, arg));
}
/* 15.3.1.3.3 */
......
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