summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--string.c2
-rw-r--r--version.h6
3 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 72b7b802d..9d6f4c671 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Wed Jun 27 00:18:41 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * string.c (rb_str_clear): need to check STR_EMBED_P() before
+ free()ing memory. a patch from Yusuke ENDOH <mame AT tsg.ne.jp>.
+ [ruby-dev:31062]
+
Tue Jun 26 16:39:01 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* process.c (proc_getgroups): use GIDT2NUM for rb_gid_t.
diff --git a/string.c b/string.c
index a7c88a55a..32adcfd39 100644
--- a/string.c
+++ b/string.c
@@ -2347,7 +2347,7 @@ static VALUE
rb_str_clear(VALUE str)
{
/* rb_str_modify() */ /* no need for str_make_independent */
- if (str_independent(str)) {
+ if (str_independent(str) && !STR_EMBED_P(str)) {
free(RSTRING_PTR(str));
}
STR_SET_EMBED(str);
diff --git a/version.h b/version.h
index 7a1ddf5f8..d58a7bb4a 100644
--- a/version.h
+++ b/version.h
@@ -1,7 +1,7 @@
#define RUBY_VERSION "1.9.0"
-#define RUBY_RELEASE_DATE "2007-06-26"
+#define RUBY_RELEASE_DATE "2007-06-27"
#define RUBY_VERSION_CODE 190
-#define RUBY_RELEASE_CODE 20070626
+#define RUBY_RELEASE_CODE 20070627
#define RUBY_PATCHLEVEL 0
#define RUBY_VERSION_MAJOR 1
@@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2007
#define RUBY_RELEASE_MONTH 6
-#define RUBY_RELEASE_DAY 26
+#define RUBY_RELEASE_DAY 27
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];