summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-03 07:19:19 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-10-03 07:19:19 +0000
commit1fe40b7cc5e92105f636d670d77b059fe4a4c50b (patch)
tree02dfc7bab198fc494d9d4f1f3bf1072d292fed66 /dir.c
parentd902111a57dfcf3c9b017b0ebd1b49f19142168c (diff)
* marshal.c (r_object): better allocation type check for
TYPE_UCLASS. usage of allocation framework is disabled for now. * variable.c (rb_class_path): Module may have subclass. * string.c (rb_str_update): should maintain original negative offset. * string.c (rb_str_subpat_set): ditto * string.c (rb_str_aset): ditto. * re.c (rb_reg_nth_match): should check negative nth. * re.c (rb_reg_nth_defined): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/dir.c b/dir.c
index 567d49a..428f4aa 100644
--- a/dir.c
+++ b/dir.c
@@ -249,9 +249,7 @@ free_dir(dir)
static VALUE dir_close _((VALUE));
static VALUE
-dir_s_new(argc, argv, klass)
- int argc;
- VALUE *argv;
+dir_s_alloc(klass)
VALUE klass;
{
struct dir_data *dirp;
@@ -259,7 +257,6 @@ dir_s_new(argc, argv, klass)
dirp->dir = NULL;
dirp->path = NULL;
- rb_obj_call_init(obj, argc, argv);
return obj;
}
@@ -995,7 +992,7 @@ Init_Dir()
rb_include_module(rb_cDir, rb_mEnumerable);
- rb_define_singleton_method(rb_cDir, "new", dir_s_new, -1);
+ rb_define_singleton_method(rb_cDir, "allocate", dir_s_alloc, 0);
rb_define_singleton_method(rb_cDir, "open", dir_s_open, 1);
rb_define_singleton_method(rb_cDir, "foreach", dir_foreach, 1);
rb_define_singleton_method(rb_cDir, "entries", dir_entries, 1);