Skip to content

Commit

Permalink
Remove unecesary and harmful pend for TruffleRuby in TestRaiseNoBackt…
Browse files Browse the repository at this point in the history
…raceException

* Specifically the second one causes `$HOME` to be unset, which breaks `File.expand_path('~')`.
* See ruby/irb#423
  • Loading branch information
eregon committed Oct 27, 2022
1 parent a102bb9 commit 4454c1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/mri/tests/irb/test_raise_no_backtrace_exception.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
module TestIRB
class TestRaiseNoBacktraceException < Test::Unit::TestCase
def test_raise_exception
pend if RUBY_ENGINE == 'truffleruby'
# pend if RUBY_ENGINE == 'truffleruby' # https://github.com/ruby/irb/pull/423
bundle_exec = ENV.key?('BUNDLE_GEMFILE') ? ['-rbundler/setup'] : []
assert_in_out_err(bundle_exec + %w[-rirb -W0 -e IRB.start(__FILE__) -- -f --], <<-IRB, /Exception: foo/, [])
e = Exception.new("foo")
Expand All @@ -23,7 +23,7 @@ def test_raise_exception_with_invalid_byte_sequence
end

def test_raise_exception_with_different_encoding_containing_invalid_byte_sequence
pend if RUBY_ENGINE == 'truffleruby'
# pend if RUBY_ENGINE == 'truffleruby' # https://github.com/ruby/irb/pull/423
backup_home = ENV["HOME"]
Dir.mktmpdir("test_irb_raise_no_backtrace_exception_#{$$}") do |tmpdir|
ENV["HOME"] = tmpdir
Expand Down

0 comments on commit 4454c1d

Please sign in to comment.