define sprintf and format as global functions

This commit is contained in:
cremno
2014-08-03 21:49:01 +02:00
committed by Yukihiro "Matz" Matsumoto
parent 857a1d9fc9
commit 11317de468
+2 -2
View File
@@ -1165,8 +1165,8 @@ void
mrb_mruby_sprintf_gem_init(mrb_state *mrb)
{
struct RClass *krn = mrb->kernel_module;
mrb_define_method(mrb, krn, "sprintf", mrb_f_sprintf, MRB_ARGS_ANY());
mrb_define_method(mrb, krn, "format", mrb_f_sprintf, MRB_ARGS_ANY());
mrb_define_module_function(mrb, krn, "sprintf", mrb_f_sprintf, MRB_ARGS_ANY());
mrb_define_module_function(mrb, krn, "format", mrb_f_sprintf, MRB_ARGS_ANY());
}
void