git.wincent.com
/
mkdtemp.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
051b988
)
Don't abuse "rb_define_module_function"
author
Wincent Colaiuta <win@wincent.com>
Wed, 28 Jul 2010 20:55:48 +0000
(22:55 +0200)
committer
Wincent Colaiuta <win@wincent.com>
Wed, 28 Jul 2010 20:55:48 +0000
(22:55 +0200)
"rb_define_singleton_method" seems more appropriate here, even though
the actual behavior seems to be basically equivalent.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
ext/mkdtemp.c
patch
|
blob
|
history
diff --git
a/ext/mkdtemp.c
b/ext/mkdtemp.c
index cd6f85640dc7dc8611737c6d3fc8207be108c28e..91ecdc1d69e5223d7e9a1a38b4e3368456361b0c 100644
(file)
--- a/
ext/mkdtemp.c
+++ b/
ext/mkdtemp.c
@@
-99,5
+99,5
@@
static VALUE dir_mkdtemp_m(int argc, VALUE *argv, VALUE self)
void Init_mkdtemp()
{
- rb_define_
module_function
(rb_cDir, "mkdtemp", dir_mkdtemp_m, -1);
+ rb_define_
singleton_method
(rb_cDir, "mkdtemp", dir_mkdtemp_m, -1);
}