summaryrefslogtreecommitdiff
path: root/etc.c
diff options
context:
space:
mode:
Diffstat (limited to 'etc.c')
-rw-r--r--etc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/etc.c b/etc.c
index 141d979..130592e 100644
--- a/etc.c
+++ b/etc.c
@@ -179,14 +179,15 @@ VALUE M_Etc;
Init_Etc()
{
M_Etc = rb_define_module("Etc");
+ rb_extend_object(M_Etc, M_Etc);
- rb_define_module_function(M_Etc, "getlogin", Fetc_getlogin, 0);
+ rb_define_method(M_Etc, "getlogin", Fetc_getlogin, 0);
- rb_define_module_function(M_Etc, "getpwuid", Fetc_getpwuid, -1);
- rb_define_module_function(M_Etc, "getpwnam", Fetc_getpwnam, 1);
- rb_define_module_function(M_Etc, "passwd", Fetc_passwd, 0);
+ rb_define_method(M_Etc, "getpwuid", Fetc_getpwuid, -1);
+ rb_define_method(M_Etc, "getpwnam", Fetc_getpwnam, 1);
+ rb_define_method(M_Etc, "passwd", Fetc_passwd, 0);
- rb_define_module_function(M_Etc, "getgrgid", Fetc_getgrgid, 1);
- rb_define_module_function(M_Etc, "getgrnam", Fetc_getgrnam, 1);
- rb_define_module_function(M_Etc, "group", Fetc_group, 0);
+ rb_define_method(M_Etc, "getgrgid", Fetc_getgrgid, 1);
+ rb_define_method(M_Etc, "getgrnam", Fetc_getgrnam, 1);
+ rb_define_method(M_Etc, "group", Fetc_group, 0);
}