From 3dc070e90e53dfd281acdbaada2871d5eeac4a1a Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 17 Jun 2007 15:56:36 +0000 Subject: [PATCH] * variable.c (rb_path2class): get rid of dangling pointer caused by optimized out value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ variable.c | 5 +---- version.h | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7e726d9d8b..7fb60a1319 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jun 18 00:58:14 2007 Nobuyoshi Nakada + + * variable.c (rb_path2class): get rid of dangling pointer caused by + optimized out value. + Sun Jun 17 11:11:07 2007 Tanaka Akira * eval.c (rb_method_missing): avoid a warning "too many arguments diff --git a/variable.c b/variable.c index caba124114..3889070782 100644 --- a/variable.c +++ b/variable.c @@ -235,11 +235,8 @@ rb_path2class(const char *path) } pbeg = p = path; while (*p) { - VALUE str; - while (*p && *p != ':') p++; - str = rb_str_new(pbeg, p-pbeg); - id = rb_intern(RSTRING_PTR(str)); + id = rb_intern2(pbeg, p-pbeg); if (p[0] == ':') { if (p[1] != ':') goto undefined_class; p += 2; diff --git a/version.h b/version.h index fa07e248e4..a68aa80568 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.9.0" -#define RUBY_RELEASE_DATE "2007-06-15" +#define RUBY_RELEASE_DATE "2007-06-18" #define RUBY_VERSION_CODE 190 -#define RUBY_RELEASE_CODE 20070615 +#define RUBY_RELEASE_CODE 20070618 #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 15 +#define RUBY_RELEASE_DAY 18 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[];