mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* string.c (str_discard): does not free for STR_NOFREE string.
[Bug #10853][ruby-core:68110] * bootstraptest/test_string.rb: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6b6680945e
commit
2270365bde
3 changed files with 11 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
Fri Feb 13 21:52:05 2015 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* string.c (str_discard): does not free for STR_NOFREE string.
|
||||
[Bug #10853][ruby-core:68110]
|
||||
|
||||
* bootstraptest/test_string.rb: test for above.
|
||||
|
||||
Fri Feb 13 21:16:00 2015 Yusuke Endoh <mame@tsg.ne.jp>
|
||||
|
||||
* lib/base64.rb: make urlsafe mode user-friendly.
|
||||
|
|
3
bootstraptest/test_string.rb
Normal file
3
bootstraptest/test_string.rb
Normal file
|
@ -0,0 +1,3 @@
|
|||
assert_normal_exit %q{
|
||||
inspect.clear
|
||||
}, '[ruby-core:68110]'
|
2
string.c
2
string.c
|
@ -1662,7 +1662,7 @@ static inline void
|
|||
str_discard(VALUE str)
|
||||
{
|
||||
str_modifiable(str);
|
||||
if (!STR_SHARED_P(str) && !STR_EMBED_P(str)) {
|
||||
if (!STR_EMBED_P(str) && !FL_TEST(str, STR_SHARED|STR_NOFREE)) {
|
||||
ruby_sized_xfree(STR_HEAP_PTR(str), STR_HEAP_SIZE(str));
|
||||
RSTRING(str)->as.heap.ptr = 0;
|
||||
RSTRING(str)->as.heap.len = 0;
|
||||
|
|
Loading…
Reference in a new issue