#370 ✓resolved
Alex Chaffee

Patch - add flie and line to eval block

Reported by Alex Chaffee | March 23rd, 2010 @ 02:51 PM

If an exception is thrown during the evaluation of a proxied method inside Webrat::Methods, the stack trace just says "(eval):2:in select". This patch adds the file and line number so poor clients can tell that it's happening inside webrat and where.

diff --git a/lib/webrat/core/methods.rb b/lib/webrat/core/methods.rb
index 7c0788d..639fd3e 100644
--- a/lib/webrat/core/methods.rb +++ b/lib/webrat/core/methods.rb @@ -3,7 +3,7 @@ module Webrat

 def self.delegate_to_session(*meths)
   meths.each do |meth|
  •  self.class_eval <<-RUBY
  •  self.class_eval(<<-RUBY, __FILE__, __LINE__)
       def #{meth}(*args, &blk)
         webrat_session.#{meth}(*args, &blk)

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Ruby Acceptance Testing for Web applications.

Shared Ticket Bins

People watching this ticket