Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Need to have a check here for JAVA PLATFORM for JRuby #2848

Merged
merged 1 commit into from

2 participants

@arunagw
Collaborator

In JRuby backtrace is different.

In JRuby first is "org/jruby/RubyKernel.java"

fixed activesupport tests for JRuby

@jonleighton
Collaborator

See my comment in #2849

@arunagw arunagw We can't simply check the first line of the backtrace,
because JRuby reports the call to __send__ in the backtrace.
fc5e3ff
@jonleighton jonleighton merged commit 74372f7 into rails:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 4, 2011
  1. @arunagw

    We can't simply check the first line of the backtrace,

    arunagw authored
    because JRuby reports the call to __send__ in the backtrace.
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 4 deletions.
  1. +6 −4 activesupport/test/core_ext/module_test.rb
View
10 activesupport/test/core_ext/module_test.rb
@@ -183,8 +183,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_delegation_exception_backtrace_with_allow_nil
@@ -192,8 +193,9 @@ def test_delegation_exception_backtrace_with_allow_nil
someone.bar
rescue NoMethodError => e
file_and_line = "#{__FILE__}:#{Someone::FAILED_DELEGATE_LINE_2}"
- 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
Something went wrong with that request. Please try again.