diff options
author | Jeremy Evans <code@jeremyevans.net> | 2020-01-20 16:53:31 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-01-20 16:58:58 +0900 |
commit | 9f99760dafac6eaa53287470b8ff59b1be0bf6d6 (patch) | |
tree | cdf96ad34f8e0c4add4af206fc710ea2201be3fe /template/transdb.h.tmpl | |
parent | f31b90f2b99b04dc9e003436a39fd08732eef004 (diff) | |
download | ruby-9f99760dafac6eaa53287470b8ff59b1be0bf6d6.tar.gz |
Get rid of use of special variables
Use `"\n"` and `IO#fileno` instead of `$/` and `$.` respectively.
[Feature #14240]
Diffstat (limited to 'template/transdb.h.tmpl')
-rw-r--r-- | template/transdb.h.tmpl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/template/transdb.h.tmpl b/template/transdb.h.tmpl index 16565dd638..990a8639d0 100644 --- a/template/transdb.h.tmpl +++ b/template/transdb.h.tmpl @@ -44,9 +44,9 @@ transdirs.each do |transdir| from_to = "%s to %s" % [$1, $2] if converters[from_to] raise ArgumentError, '%s:%d: transcode "%s" is already registered at %s:%d' % - [path, $., from_to, *converters[from_to].values_at(3, 4)] + [path, f.lineno, from_to, *converters[from_to].values_at(3, 4)] else - converters[from_to] = [$1, $2, fn[0..-3], path, $.] + converters[from_to] = [$1, $2, fn[0..-3], path, f.lineno] converter_list << from_to end end |