提交 46f76ea5 编写于 作者: N Nicholas Seckar

Improve line number detection for template errors

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2655 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 57f43473
*SVN*
* Improve line number detection for template errors [Nicholas Seckar]
* Update/clean up documentation (rdoc)
* Upgrade to Prototype 1.4.0_rc0 [Sam Stephenson]
......
......@@ -47,7 +47,7 @@ def sub_template_of(file_name)
def line_number
if file_name
regexp = /#{Regexp.escape file_name}:(\d+)\s*$/
regexp = /#{Regexp.escape File.basename(file_name)}:(\d+)\s*$/
[@original_exception.message, @original_exception.clean_backtrace].flatten.each do |line|
return $1.to_i if regexp =~ line
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册