diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fc663308d..da08f9638 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,15 +16,10 @@ jobs: - '3.0' - '2.7' - '2.6' - - '2.5' - head - truffleruby-head os: [ubuntu-latest] with_latest_reline: [true, false] - exclude: - - ruby: '2.5' - os: ubuntu-latest - with_latest_reline: true fail-fast: false runs-on: ${{ matrix.os }} env: diff --git a/irb.gemspec b/irb.gemspec index d44393804..c3e8a4dc5 100644 --- a/irb.gemspec +++ b/irb.gemspec @@ -34,7 +34,7 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.required_ruby_version = Gem::Requirement.new(">= 2.5") + spec.required_ruby_version = Gem::Requirement.new(">= 2.6") spec.add_dependency "reline", ">= 0.3.0" end diff --git a/lib/irb.rb b/lib/irb.rb index 04009664e..ab5702c9f 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -598,11 +598,7 @@ def handle_exception(exc) if exc.backtrace order = nil - if '2.5.0' == RUBY_VERSION - # Exception#full_message doesn't have keyword arguments. - message = exc.full_message # the same of (highlight: true, order: bottom) - order = :bottom - elsif '2.5.1' <= RUBY_VERSION && RUBY_VERSION < '3.0.0' + if RUBY_VERSION < '3.0.0' if STDOUT.tty? message = exc.full_message(order: :bottom) order = :bottom diff --git a/test/irb/test_context.rb b/test/irb/test_context.rb index e127ba759..4d256a73a 100644 --- a/test/irb/test_context.rb +++ b/test/irb/test_context.rb @@ -492,7 +492,7 @@ def test_eval_input_with_exception irb.eval_input end assert_empty err - if '2.5.0' <= RUBY_VERSION && RUBY_VERSION < '3.0.0' && STDOUT.tty? + if RUBY_VERSION < '3.0.0' && STDOUT.tty? expected = [ :*, /Traceback \(most recent call last\):\n/, :*, /\t 2: from \(irb\):1:in `
'\n/, @@ -523,7 +523,7 @@ def test_eval_input_with_invalid_byte_sequence_exception irb.eval_input end assert_empty err - if '2.5.0' <= RUBY_VERSION && RUBY_VERSION < '3.0.0' && STDOUT.tty? + if RUBY_VERSION < '3.0.0' && STDOUT.tty? expected = [ :*, /Traceback \(most recent call last\):\n/, :*, /\t 2: from \(irb\):1:in `
'\n/, @@ -560,7 +560,7 @@ def test_eval_input_with_long_exception irb.eval_input end assert_empty err - if '2.5.0' <= RUBY_VERSION && RUBY_VERSION < '3.0.0' && STDOUT.tty? + if RUBY_VERSION < '3.0.0' && STDOUT.tty? expected = [ :*, /Traceback \(most recent call last\):\n/, :*, /\t... \d+ levels...\n/, diff --git a/test/irb/test_ruby_lex.rb b/test/irb/test_ruby_lex.rb index 2b16e2e9a..fa68a4632 100644 --- a/test/irb/test_ruby_lex.rb +++ b/test/irb/test_ruby_lex.rb @@ -181,9 +181,6 @@ def test_symbols end def test_endless_range_at_end_of_line - if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.6.0') - pend 'Endless range is available in 2.6.0 or later' - end input_with_prompt = [ PromptRow.new('001:0: :> ', %q(a = 3..)), PromptRow.new('002:0: :* ', %q()), diff --git a/test/lib/core_assertions.rb b/test/lib/core_assertions.rb index bac3856a9..d8219ad71 100644 --- a/test/lib/core_assertions.rb +++ b/test/lib/core_assertions.rb @@ -694,8 +694,7 @@ def assert_join_threads(threads, message = nil) if !errs.empty? msg = "exceptions on #{errs.length} threads:\n" + errs.map {|t, err| - "#{t.inspect}:\n" + - RUBY_VERSION >= "2.5.0" ? err.full_message(highlight: false, order: :top) : err.message + "#{t.inspect}:\n" + err.full_message(highlight: false, order: :top) }.join("\n---\n") if message msg = "#{message}\n#{msg}"