summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-sprintf
diff options
context:
space:
mode:
authorcremno <[email protected]>2014-08-03 21:49:01 +0200
committerYukihiro "Matz" Matsumoto <[email protected]>2020-10-12 16:21:46 +0900
commit11317de468a9b93731308f30b532cc3cf7254863 (patch)
tree184861fbb2647abc53e0dfcbb198824e52cfda18 /mrbgems/mruby-sprintf
parent857a1d9fc94c831e8ce50bb25dde88c2c04d5757 (diff)
downloadmruby-11317de468a9b93731308f30b532cc3cf7254863.tar.gz
mruby-11317de468a9b93731308f30b532cc3cf7254863.zip
define sprintf and format as global functions
Diffstat (limited to 'mrbgems/mruby-sprintf')
-rw-r--r--mrbgems/mruby-sprintf/src/sprintf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mrbgems/mruby-sprintf/src/sprintf.c b/mrbgems/mruby-sprintf/src/sprintf.c
index 15c675288..3e228718e 100644
--- a/mrbgems/mruby-sprintf/src/sprintf.c
+++ b/mrbgems/mruby-sprintf/src/sprintf.c
@@ -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