summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-19 01:08:00 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-19 01:08:00 (GMT)
commit16ba36042340103b4f079a370238f54c4696bac1 (patch)
treedb0583b55ffcc328736d9c4863f9e44bab3d5a82 /template
parent56d8b8701df75d7bd8b0c402c624f38c56385c92 (diff)
prelude.c.tmpl: strip prefix
* template/prelude.c.tmpl (Prelude#translate): strip VPATH prefix from prelude names, so that srcdir diffrences do not make the generated code diffrent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template')
-rw-r--r--template/prelude.c.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/template/prelude.c.tmpl b/template/prelude.c.tmpl
index e1859fd..c2f41da 100644
--- a/template/prelude.c.tmpl
+++ b/template/prelude.c.tmpl
@@ -41,7 +41,7 @@ class Prelude
idx = @preludes[filename]
return idx if idx
lines = []
- result = [@preludes.size, filename, lines, sub]
+ result = [@preludes.size, @vpath.strip(filename), lines, sub]
@vpath.foreach(filename) do |line|
@preludes[filename] ||= result
line.sub!(/(?:^|\s+)\#(?:$|\s.*)/, '')