From 3dc070e90e53dfd281acdbaada2871d5eeac4a1a Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 17 Jun 2007 15:56:36 +0000 Subject: * 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 --- variable.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'variable.c') 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; -- cgit v1.2.3