Use mrb_get_arg1() instead of mrb_get_args() for single argument

This commit is contained in:
Yukihiro "Matz" Matsumoto
2023-02-21 16:33:15 +09:00
parent aecbdf72bf
commit a21edf75ad
2 changed files with 2 additions and 4 deletions
+1 -2
View File
@@ -1177,9 +1177,8 @@ mrb_str_del_suffix(mrb_state *mrb, mrb_value self)
static mrb_value
mrb_str_casecmp(mrb_state *mrb, mrb_value self)
{
mrb_value str;
mrb_value str = mrb_get_arg1(mrb);
mrb_get_args(mrb, "o", &str);
if (!mrb_string_p(str)) return mrb_nil_value();
struct RString *s1 = mrb_str_ptr(self);