summaryrefslogtreecommitdiff
path: root/re.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-11 09:32:41 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-12-11 09:32:41 +0000
commit2498da0ea0598e30208bcf533e6215169caf5cd7 (patch)
treeaaaef9a55f32047802479707b99a7bf1f8a894da /re.c
parent1b19c063b8517a4b1c9c31029c49023fa74fb3bd (diff)
* io.c (io_read): takes optional second argument to specify a
string to be written. the string should not be frozen. * io.c (rb_io_sysread): ditto. * lib/getoptlong.rb (GetoptLong::Error): provide a common ancestor for GetoptLong error classes (RCR#129). * re.c (rb_reg_copy_object): fixed memory leak. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 're.c')
-rw-r--r--re.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/re.c b/re.c
index 9972ba04d7..06f6502530 100644
--- a/re.c
+++ b/re.c
@@ -1318,9 +1318,6 @@ rb_reg_copy_object(copy, re)
if (!rb_obj_is_instance_of(re, rb_obj_class(copy))) {
rb_raise(rb_eTypeError, "wrong argument type");
}
- RREGEXP(copy)->ptr = 0;
- RREGEXP(copy)->len = 0;
- RREGEXP(copy)->str = 0;
rb_reg_check(re);
rb_reg_initialize(copy, RREGEXP(re)->str, RREGEXP(re)->len,
rb_reg_options(re));