Remove redundant type-check

since mrb_str_to_str() also does it.
parent e440681a
...@@ -1963,9 +1963,6 @@ mrb_str_intern(mrb_state *mrb, mrb_value self) ...@@ -1963,9 +1963,6 @@ mrb_str_intern(mrb_state *mrb, mrb_value self)
MRB_API mrb_value MRB_API mrb_value
mrb_obj_as_string(mrb_state *mrb, mrb_value obj) mrb_obj_as_string(mrb_state *mrb, mrb_value obj)
{ {
if (mrb_string_p(obj)) {
return obj;
}
return mrb_str_to_str(mrb, obj); return mrb_str_to_str(mrb, obj);
} }
......
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