Permalink
Browse files

Merge pull request #2849 from arunagw/jruby_activesupport_fix_3-1-stable

Jruby activesupport fix 3 1 stable for JRuby
  • Loading branch information...
2 parents 000fee7 + 5df885e commit df3360f05b002573dba6729ea161369ec1504134 @jonleighton jonleighton committed Sep 4, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 activesupport/test/core_ext/module_test.rb
View
5 activesupport/test/core_ext/module_test.rb
@@ -172,8 +172,9 @@ def test_delegation_exception_backtrace
someone.foo
rescue NoMethodError => e
file_and_line = "#{__FILE__}:#{Someone::FAILED_DELEGATE_LINE}"
- assert e.backtrace.first.include?(file_and_line),
- "[#{e.backtrace.first}] did not include [#{file_and_line}]"
+ # We can't simply check the first line of the backtrace, because JRuby reports the call to __send__ in the backtrace.
+ assert e.backtrace.any?{|a| a.include?(file_and_line)},
+ "[#{e.backtrace.inspect}] did not include [#{file_and_line}]"
end
def test_parent

0 comments on commit df3360f

Please sign in to comment.