summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
Diffstat (limited to 'iseq.c')
-rw-r--r--iseq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/iseq.c b/iseq.c
index ef6a7022df..63be78e37c 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;