mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
mruby-print/print.rb: reduce explicit return values; ref #5762
By making __printstr__ to return nil.
This commit is contained in:
@@ -47,11 +47,9 @@ module Kernel
|
||||
i += 1
|
||||
end
|
||||
__printstr__ "\n" if len == 0
|
||||
nil
|
||||
end
|
||||
|
||||
def printf(*args)
|
||||
__printstr__(sprintf(*args))
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
||||
@@ -43,7 +43,7 @@ mrb_printstr(mrb_state *mrb, mrb_value self)
|
||||
if (mrb_string_p(s)) {
|
||||
printstr(mrb, RSTRING_PTR(s), RSTRING_LEN(s));
|
||||
}
|
||||
return s;
|
||||
return mrb_nil_value();
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user