diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-21 08:48:07 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-11-21 08:48:07 +0000 |
commit | afa10bd12533b1f42b609a055e94f520005d88c6 (patch) | |
tree | e969343b1f2f20a3df56d2c9e1ef72f8c7b2564c /template | |
parent | bca966617e4d765c3cfb8cecf1030f1e3c2fb2db (diff) | |
download | ruby-afa10bd12533b1f42b609a055e94f520005d88c6.tar.gz |
Skip comment lines
* template/prelude.c.tmpl (translate): empty (only LF) lines are not necessary.
so skip them, but for safety only when they are made from comment line.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60873 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template')
-rw-r--r-- | template/prelude.c.tmpl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/template/prelude.c.tmpl b/template/prelude.c.tmpl index ef024fd05c..34763cc730 100644 --- a/template/prelude.c.tmpl +++ b/template/prelude.c.tmpl @@ -42,6 +42,7 @@ class Prelude result = [@preludes.size, @vpath.strip(filename), lines, sub] @vpath.foreach(filename) do |line| @preludes[filename] ||= result + next if /\A\s*\#.*\n\z/ =~ line line.sub!(/(?:^|\s+)\#(?:$|[#\s].*)/, '') line.sub!(/require(_relative)?\s*\(?\s*(["'])(.*?)(?:\.rb)?\2\)?/) do orig, rel, path = $&, $2, $3 |