Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 2ba1b65

Browse files
authored
Merge pull request #2946 from gogainda/truffleruby
Add TruffleRuby support
2 parents bfd13aa + aeb4326 commit 2ba1b65

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

lib/rspec/core/formatters/exception_presenter.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ def find_failed_line
242242
line_regex = RSpec.configuration.in_project_source_dir_regex
243243
loaded_spec_files = RSpec.configuration.loaded_spec_files
244244

245+
exception_backtrace.reject! do |line|
246+
line.start_with?("<internal:")
247+
end
248+
245249
exception_backtrace.find do |line|
246250
next unless (line_path = line[/(.+?):(\d+)(|:\d+)/, 1])
247251
path = File.expand_path(line_path)

spec/rspec/core_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
# JRuby appears to not respect `--disable=gem` so rubygems also gets loaded.
1414
allowed_loaded_features << /rubygems/ if RSpec::Support::Ruby.jruby?
1515

16+
# Truffleruby cext files
17+
allowed_loaded_features << /\/truffle\/cext/ if RSpec::Support::Ruby.truffleruby?
18+
1619
disable_autorun_code =
1720
if RSpec::Support::OS.windows?
1821
# On Windows, the "redefine autorun" approach results in a different

0 commit comments

Comments
 (0)