Changeset 2773
- Timestamp:
- 10/27/05 21:58:39 (3 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/templates/rescues/_trace.rhtml (modified) (1 diff)
- trunk/actionpack/lib/action_view/template_error.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r2772 r2773 1 1 *SVN* 2 3 * Fix line number detection and escape RAILS_ROOT in backtrace Regexp [Nicholas Seckar] 2 4 3 5 * Fixed document.getElementsByClassName from Prototype to be speedy again [Sam Stephenson] trunk/actionpack/lib/action_controller/templates/rescues/_trace.rhtml
r2769 r2773 5 5 ["Full Trace", @exception.clean_backtrace] 6 6 ] 7 if defined?(RAILS_ROOT)8 traces.each { |name, trace| trace.map! { |p| p.gsub(/^(?:\.\/)?#{RAILS_ROOT}/, '<b>#{RAILS_ROOT}</b>') } }9 end10 7 names = traces.collect {|name, trace| name} 11 8 %> trunk/actionpack/lib/action_view/template_error.rb
r2655 r2773 48 48 def line_number 49 49 if file_name 50 regexp = /#{Regexp.escape File.basename(file_name)}:(\d+) \s*$/50 regexp = /#{Regexp.escape File.basename(file_name)}:(\d+)/ 51 51 [@original_exception.message, @original_exception.clean_backtrace].flatten.each do |line| 52 52 return $1.to_i if regexp =~ line … … 84 84 85 85 Exception::TraceSubstitutions << [/:in\s+`_run_(html|xml).*'\s*$/, ''] if defined?(Exception::TraceSubstitutions) 86 Exception::TraceSubstitutions << [%r{^\s*#{Regexp.escape RAILS_ROOT}}, '#{RAILS_ROOT}'] if defined?(RAILS_ROOT)