1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

set ERB#filename so that it is used when reporting syntax/runtime errors.

Tabs converted to spaces.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
seki 2005-09-11 13:18:59 +00:00
parent f610eab082
commit 48a9b6170e
2 changed files with 82 additions and 75 deletions

View file

@ -1,3 +1,8 @@
Sun Sep 11 22:18:07 2005 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
* bin/erb (ERB::Main#run): set ERB#filename so that it is used
when reporting syntax/runtime errors. Tabs converted to spaces.
Sat Sep 10 22:34:19 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
* array.c: protoize.

View file

@ -113,9 +113,11 @@ EOU
end
src = $<.read
filename = $FILENAME
exit 2 unless src
trim = trim_mode_opt(trim_mode, disable_percent)
erb = factory.new(src.untaint, safe_level, trim)
erb.filename = filename
if output
if number
l = 1