Skip to content

Commit 923c1aa

Browse files
st0012hsbt
authored andcommitted
Drop Ruby 2.5 support
Because it has reached EOL for more than 1.5 years and it won't be supported by the next reline version either.
1 parent e61b3e6 commit 923c1aa

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

lib/irb.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -598,11 +598,7 @@ def handle_exception(exc)
598598

599599
if exc.backtrace
600600
order = nil
601-
if '2.5.0' == RUBY_VERSION
602-
# Exception#full_message doesn't have keyword arguments.
603-
message = exc.full_message # the same of (highlight: true, order: bottom)
604-
order = :bottom
605-
elsif '2.5.1' <= RUBY_VERSION && RUBY_VERSION < '3.0.0'
601+
if RUBY_VERSION < '3.0.0'
606602
if STDOUT.tty?
607603
message = exc.full_message(order: :bottom)
608604
order = :bottom

lib/irb/irb.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
3434
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
3535
spec.require_paths = ["lib"]
3636

37-
spec.required_ruby_version = Gem::Requirement.new(">= 2.5")
37+
spec.required_ruby_version = Gem::Requirement.new(">= 2.6")
3838

3939
spec.add_dependency "reline", ">= 0.3.0"
4040
end

test/irb/test_context.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ def test_eval_input_with_exception
492492
irb.eval_input
493493
end
494494
assert_empty err
495-
if '2.5.0' <= RUBY_VERSION && RUBY_VERSION < '3.0.0' && STDOUT.tty?
495+
if RUBY_VERSION < '3.0.0' && STDOUT.tty?
496496
expected = [
497497
:*, /Traceback \(most recent call last\):\n/,
498498
:*, /\t 2: from \(irb\):1:in `<main>'\n/,
@@ -523,7 +523,7 @@ def test_eval_input_with_invalid_byte_sequence_exception
523523
irb.eval_input
524524
end
525525
assert_empty err
526-
if '2.5.0' <= RUBY_VERSION && RUBY_VERSION < '3.0.0' && STDOUT.tty?
526+
if RUBY_VERSION < '3.0.0' && STDOUT.tty?
527527
expected = [
528528
:*, /Traceback \(most recent call last\):\n/,
529529
:*, /\t 2: from \(irb\):1:in `<main>'\n/,
@@ -560,7 +560,7 @@ def test_eval_input_with_long_exception
560560
irb.eval_input
561561
end
562562
assert_empty err
563-
if '2.5.0' <= RUBY_VERSION && RUBY_VERSION < '3.0.0' && STDOUT.tty?
563+
if RUBY_VERSION < '3.0.0' && STDOUT.tty?
564564
expected = [
565565
:*, /Traceback \(most recent call last\):\n/,
566566
:*, /\t... \d+ levels...\n/,

test/irb/test_ruby_lex.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,6 @@ def test_symbols
181181
end
182182

183183
def test_endless_range_at_end_of_line
184-
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.6.0')
185-
pend 'Endless range is available in 2.6.0 or later'
186-
end
187184
input_with_prompt = [
188185
PromptRow.new('001:0: :> ', %q(a = 3..)),
189186
PromptRow.new('002:0: :* ', %q()),

0 commit comments

Comments
 (0)