diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-10-05 06:30:42 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2001-10-05 06:30:42 +0000 |
commit | ef52ffdf61f7ed1042d8dae2f7c98385b6f7f990 (patch) | |
tree | a3f924924f2ecfb32a593b11368d276c0447e518 /re.c | |
parent | 809a9c5b6d1454e623e929afdf5a878bdb4023dc (diff) |
* marshal.c (w_unique): should not dump anonymous class.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 33 |
1 files changed, 15 insertions, 18 deletions
@@ -883,17 +883,28 @@ rb_reg_initialize(obj, s, len, options) } } +static VALUE +rb_reg_s_alloc(klass) + VALUE klass; +{ + NEWOBJ(re, struct RRegexp); + OBJSETUP(re, klass, T_REGEXP); + + re->ptr = 0; + re->len = 0; + re->str = 0; + + return (VALUE)re; +} + VALUE rb_reg_new(s, len, options) const char *s; long len; int options; { - - NEWOBJ(re, struct RRegexp); - OBJSETUP(re, rb_cRegexp, T_REGEXP); + VALUE re = rb_reg_s_alloc(rb_cRegexp); - re->ptr = 0; re->len = 0; re->str = 0; rb_reg_initialize(re, s, len, options); return (VALUE)re; } @@ -1042,20 +1053,6 @@ rb_reg_initialize_m(argc, argv, self) } static VALUE -rb_reg_s_alloc(klass) - VALUE klass; -{ - NEWOBJ(re, struct RRegexp); - OBJSETUP(re, klass, T_REGEXP); - - re->ptr = 0; - re->len = 0; - re->str = 0; - - return (VALUE)re; -} - -static VALUE rb_reg_s_quote(argc, argv) int argc; VALUE *argv; |