From bc49bc7c6b6a16d725cd1279e9021465b1307f3d Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 20 Dec 2002 08:33:17 +0000 Subject: * parse.y (do_block): split "do" block and tLBRACE_ARG block. * parse.y (cmd_brace_block): new tLBRACE_ARG block rule * parse.y (command): can take optional cmd_brace_block; use %prec to resolve shift/reduce conflict. (ruby-bugs-ja PR#372) * eval.c (ruby_finalize): trace_func should be cleared here (after executing exit procs and finalizers). * eval.c (rb_define_alloc_func): new allocation framework, based on Nobu's work [ruby-dev:19116]. "allocate" method is no longer used for object allocation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- re.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 're.c') diff --git a/re.c b/re.c index 354bab28e1..1757e968c7 100644 --- a/re.c +++ b/re.c @@ -1594,7 +1594,7 @@ Init_Regexp() rb_define_virtual_variable("$-K", kcode_getter, kcode_setter); rb_cRegexp = rb_define_class("Regexp", rb_cObject); - rb_define_singleton_method(rb_cRegexp, "allocate", rb_reg_s_alloc, 0); + rb_define_alloc_func(rb_cRegexp, rb_reg_s_alloc); rb_define_singleton_method(rb_cRegexp, "compile", rb_class_new_instance, -1); rb_define_singleton_method(rb_cRegexp, "quote", rb_reg_s_quote, -1); rb_define_singleton_method(rb_cRegexp, "escape", rb_reg_s_quote, -1); @@ -1624,7 +1624,7 @@ Init_Regexp() rb_cMatch = rb_define_class("MatchData", rb_cObject); rb_define_global_const("MatchingData", rb_cMatch); - rb_define_singleton_method(rb_cMatch, "allocate", match_alloc, 0); + rb_define_alloc_func(rb_cMatch, match_alloc); rb_undef_method(CLASS_OF(rb_cMatch), "new"); rb_define_method(rb_cMatch, "copy_object", match_copy_object, 1); -- cgit v1.2.3