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
This commit is contained in:
nagachika 2013-07-20 14:45:51 +00:00
parent 3cdf8cf91d
commit 3207cfced7
3 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Sat Jul 20 23:31:11 2013 Aman Gupta <tmm1@ruby-lang.org>
* 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 <e@zzak.io> Sun Jul 14 00:18:08 2013 Zachary Scott <e@zzak.io>
* sprintf.c: Fix typo patch by @hynkle [Fixes GH-357] * sprintf.c: Fix typo patch by @hynkle [Fixes GH-357]

3
iseq.c
View file

@ -188,6 +188,9 @@ iseq_location_setup(rb_iseq_t *iseq, VALUE path, VALUE absolute_path, VALUE name
{ {
rb_iseq_location_t *loc = &iseq->location; rb_iseq_location_t *loc = &iseq->location;
loc->path = path; loc->path = path;
if (RTEST(absolute_path) && rb_str_cmp(path, absolute_path) == 0)
loc->absolute_path = path;
else
loc->absolute_path = absolute_path; loc->absolute_path = absolute_path;
loc->label = loc->base_label = name; loc->label = loc->base_label = name;
loc->first_lineno = first_lineno; loc->first_lineno = first_lineno;

View file

@ -1,6 +1,6 @@
#define RUBY_VERSION "2.0.0" #define RUBY_VERSION "2.0.0"
#define RUBY_RELEASE_DATE "2013-07-20" #define RUBY_RELEASE_DATE "2013-07-20"
#define RUBY_PATCHLEVEL 271 #define RUBY_PATCHLEVEL 272
#define RUBY_RELEASE_YEAR 2013 #define RUBY_RELEASE_YEAR 2013
#define RUBY_RELEASE_MONTH 7 #define RUBY_RELEASE_MONTH 7