1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

merge revision(s) 49586: [Backport #10853]

* 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/branches/ruby_2_2@49621 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2015-02-17 02:50:37 +00:00
parent 4aacaf216c
commit d4f507ab97
4 changed files with 14 additions and 4 deletions

View file

@ -1,3 +1,10 @@
Tue Feb 17 11:50:06 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.
Sun Feb 15 13:15:46 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/socket/getaddrinfo.c (get_addr): reject too long hostname to

View file

@ -0,0 +1,3 @@
assert_normal_exit %q{
inspect.clear
}, '[ruby-core:68110]'

View file

@ -1658,7 +1658,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;

View file

@ -1,10 +1,10 @@
#define RUBY_VERSION "2.2.0"
#define RUBY_RELEASE_DATE "2015-02-15"
#define RUBY_PATCHLEVEL 49
#define RUBY_RELEASE_DATE "2015-02-17"
#define RUBY_PATCHLEVEL 50
#define RUBY_RELEASE_YEAR 2015
#define RUBY_RELEASE_MONTH 2
#define RUBY_RELEASE_DAY 15
#define RUBY_RELEASE_DAY 17
#include "ruby/version.h"