Skip to content

Commit

Permalink
Merge pull request #288 from freerange/add-jruby-to-build-matrix
Browse files Browse the repository at this point in the history
Add latest stable version of JRuby to Travis CI build matrix
  • Loading branch information
floehopper committed Dec 1, 2016
2 parents eca7560 + 2cdef34 commit 2e67044
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Expand Up @@ -9,12 +9,16 @@ rvm:
- 2.1
- 2.2
- 2.3
- jruby
gemfile:
- Gemfile
env:
- MOCHA_OPTIONS=debug
matrix:
include:
- rvm: jruby
gemfile: gemfiles/Gemfile.minitest.latest
env: MOCHA_OPTIONS=debug MOCHA_RUN_INTEGRATION_TESTS=minitest
- rvm: 2.3
gemfile: gemfiles/Gemfile.minitest.latest
env: MOCHA_OPTIONS=debug MOCHA_RUN_INTEGRATION_TESTS=minitest
Expand Down Expand Up @@ -75,6 +79,9 @@ matrix:
- rvm: 1.8.7
gemfile: gemfiles/Gemfile.minitest.1.3.0
env: MOCHA_OPTIONS=debug MOCHA_RUN_INTEGRATION_TESTS=minitest
- rvm: jruby
gemfile: gemfiles/Gemfile.test-unit.latest
env: MOCHA_OPTIONS=debug MOCHA_RUN_INTEGRATION_TESTS=test-unit
- rvm: 2.3
gemfile: gemfiles/Gemfile.test-unit.latest
env: MOCHA_OPTIONS=debug MOCHA_RUN_INTEGRATION_TESTS=test-unit
Expand Down
10 changes: 6 additions & 4 deletions test/execution_point.rb
Expand Up @@ -10,14 +10,16 @@ def initialize(backtrace)
@backtrace = backtrace
end

def first_relevant_line_of_backtrace
@backtrace && (@backtrace.reject { |l| /\Aorg\/jruby\//.match(l) }.first || 'unknown:0')
end

def file_name
return "unknown" unless @backtrace && @backtrace.first
/\A(.*?):\d+/.match(@backtrace.first)[1]
/\A(.*?):\d+/.match(first_relevant_line_of_backtrace)[1]
end

def line_number
return "unknown" unless @backtrace && @backtrace.first
Integer(/\A.*?:(\d+)/.match(@backtrace.first)[1])
Integer(/\A.*?:(\d+)/.match(first_relevant_line_of_backtrace)[1])
end

def ==(other)
Expand Down

0 comments on commit 2e67044

Please sign in to comment.