Better stack traces when using class_eval (Alex Chaffee).

This commit is contained in:
Damian Janowski 2010-04-12 17:45:10 -03:00
parent ef6874c855
commit 0bbf163d4f

View File

@ -3,7 +3,7 @@ module Webrat
def self.delegate_to_session(*meths) def self.delegate_to_session(*meths)
meths.each do |meth| meths.each do |meth|
self.class_eval <<-RUBY self.class_eval(<<-RUBY, __FILE__, __LINE__)
def #{meth}(*args, &blk) def #{meth}(*args, &blk)
webrat_session.#{meth}(*args, &blk) webrat_session.#{meth}(*args, &blk)
end end