From 3207cfced7dc17d3971e76bb080aadae02b5eb2d Mon Sep 17 00:00:00 2001 From: nagachika Date: Sat, 20 Jul 2013 14:45:51 +0000 Subject: [PATCH] merge revision(s) 40334: [Backport #8149] * iseq.c (iseq_location_setup): re-use existing string when iseq has the same path and absolute_path. [Bug #8149] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@42089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ iseq.c | 5 ++++- version.h | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 30e8528acf..11ddb26523 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Jul 20 23:31:11 2013 Aman Gupta + + * iseq.c (iseq_location_setup): re-use existing string when iseq has + the same path and absolute_path. [Bug #8149] + Sun Jul 14 00:18:08 2013 Zachary Scott * sprintf.c: Fix typo patch by @hynkle [Fixes GH-357] diff --git a/iseq.c b/iseq.c index 567f9ea429..0af29391b0 100644 --- a/iseq.c +++ b/iseq.c @@ -188,7 +188,10 @@ iseq_location_setup(rb_iseq_t *iseq, VALUE path, VALUE absolute_path, VALUE name { rb_iseq_location_t *loc = &iseq->location; loc->path = path; - loc->absolute_path = absolute_path; + if (RTEST(absolute_path) && rb_str_cmp(path, absolute_path) == 0) + loc->absolute_path = path; + else + loc->absolute_path = absolute_path; loc->label = loc->base_label = name; loc->first_lineno = first_lineno; return loc; diff --git a/version.h b/version.h index be91f44182..e81d7995e9 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.0.0" #define RUBY_RELEASE_DATE "2013-07-20" -#define RUBY_PATCHLEVEL 271 +#define RUBY_PATCHLEVEL 272 #define RUBY_RELEASE_YEAR 2013 #define RUBY_RELEASE_MONTH 7