diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-18 16:02:08 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-18 16:02:08 +0000 |
| commit | 3dc2208695473926e3ab2047a49ce73212479aae (patch) | |
| tree | 27e6bbac4bdbf5e0a89a31c91a4b1eda6613bfb0 /string.c | |
| parent | 91645b9f9aef6764b6ab90917f19a55a02635498 (diff) | |
| download | ruby-3dc2208695473926e3ab2047a49ce73212479aae.tar.gz ruby-3dc2208695473926e3ab2047a49ce73212479aae.tar.xz ruby-3dc2208695473926e3ab2047a49ce73212479aae.zip | |
* string.c (str_gsub): internal buffer should not be listed by
ObjectSpace.each_object(). [ruby-dev:24919]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
| -rw-r--r-- | string.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2076,6 +2076,9 @@ str_gsub(argc, argv, str, bang) blen = RSTRING(str)->len + 30; /* len + margin */ dest = rb_str_new5(str, 0, blen); + if (bang) { + RBASIC(dest)->klass = 0; + } buf = RSTRING(dest)->ptr; bp = buf; sp = cp = RSTRING(str)->ptr; |
