summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorst0012 <[email protected]>2022-07-25 23:35:25 +0100
committerHiroshi SHIBATA <[email protected]>2022-11-17 13:06:32 +0900
commit923c1aaed7a5707d5c358627aad37f29e7738143 (patch)
tree6df756bc50ad8080cf043767790bf9605cf0647a
parente61b3e6f43434bd815577a67d4f1719091b57d5c (diff)
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.
-rw-r--r--lib/irb.rb6
-rw-r--r--lib/irb/irb.gemspec2
-rw-r--r--test/irb/test_context.rb6
-rw-r--r--test/irb/test_ruby_lex.rb3
4 files changed, 5 insertions, 12 deletions
diff --git a/lib/irb.rb b/lib/irb.rb
index 04009664ef..ab5702c9f2 100644
--- a/lib/irb.rb
+++ b/lib/irb.rb
@@ -598,11 +598,7 @@ module IRB
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/lib/irb/irb.gemspec b/lib/irb/irb.gemspec
index d443938043..c3e8a4dc58 100644
--- a/lib/irb/irb.gemspec
+++ b/lib/irb/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/test/irb/test_context.rb b/test/irb/test_context.rb
index e127ba7599..4d256a73a2 100644
--- a/test/irb/test_context.rb
+++ b/test/irb/test_context.rb
@@ -492,7 +492,7 @@ module TestIRB
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 `<main>'\n/,
@@ -523,7 +523,7 @@ module TestIRB
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 `<main>'\n/,
@@ -560,7 +560,7 @@ module TestIRB
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 2b16e2e9a1..fa68a4632c 100644
--- a/test/irb/test_ruby_lex.rb
+++ b/test/irb/test_ruby_lex.rb
@@ -181,9 +181,6 @@ module TestIRB
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()),