mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Merge pull request #6302 from auroranockert/minor-mrb-str-init-cleanup
Minor cleanup in mrb_str_init
This commit is contained in:
+1
-2
@@ -1982,8 +1982,7 @@ mrb_str_init(mrb_state *mrb, mrb_value self)
|
||||
mrb_value str2;
|
||||
|
||||
if (mrb_get_args(mrb, "|S", &str2) == 0) {
|
||||
struct RString *s = str_new(mrb, 0, 0);
|
||||
str2 = mrb_obj_value(s);
|
||||
str2 = mrb_str_new(mrb, 0, 0);
|
||||
}
|
||||
str_replace(mrb, mrb_str_ptr(self), mrb_str_ptr(str2));
|
||||
return self;
|
||||
|
||||
Reference in New Issue
Block a user