diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-08 13:30:04 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-08 13:30:04 +0000 |
commit | 83c7d9df2b0fce04c9f06911d0ed21153ba29fa2 (patch) | |
tree | 0d55208ab75dbd64cda593ec5700e9183a0d2531 /ext | |
parent | 54b90b7be8d38fea97251a89f23380facb8d7475 (diff) | |
download | ruby-83c7d9df2b0fce04c9f06911d0ed21153ba29fa2.tar.gz |
* string.c (rb_str_modify_expand): fix memory leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r-- | ext/-test-/string/modify.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/-test-/string/modify.c b/ext/-test-/string/modify.c index a6930051b6..ddd2efd8f0 100644 --- a/ext/-test-/string/modify.c +++ b/ext/-test-/string/modify.c @@ -7,8 +7,16 @@ bug_str_modify(VALUE str) return str; } +VALUE +bug_str_modify_expand(VALUE str, VALUE expand) +{ + rb_str_modify_expand(str, NUM2LONG(expand)); + return str; +} + void Init_modify(VALUE klass) { rb_define_method(klass, "modify!", bug_str_modify, 0); + rb_define_method(klass, "modify_expand!", bug_str_modify_expand, 1); } |