Skip to content

Commit

Permalink
Drop to support old IRB (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick authored Dec 27, 2024
1 parent a962d9b commit 10b35ee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion gemfiles/oldest/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ group :test do
gem 'test-unit-ruby-core', '~> 1.0'
gem 'warning', '~> 1.3.0'

gem 'irb', '1.13.0'
gem 'irb', '1.14.0'
gem 'power_assert', '2.0.3'
end
2 changes: 1 addition & 1 deletion irb-power_assert.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
'rubygems_mfa_required' => 'true',
}

gem.add_dependency 'irb', '>= 1.13.0', '< 2.0'
gem.add_dependency 'irb', '>= 1.14.0', '< 2.0'
gem.add_dependency 'power_assert', '>= 2.0.3', '< 3.0'

gem.required_ruby_version = '>= 3.3'
Expand Down
16 changes: 2 additions & 14 deletions test/test_irb_power_assert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,7 @@ def test_typical_example
out, err = execute_lines(%q{pa "0".class == "3".to_i.times.map {|i| i + 1 }.class})

assert_equal('', err)
# TODO: Remove this version guard after dropping to support irb 1.13.x
# https://github.com/ruby/irb/pull/972
if Gem::Version.new(IRB::VERSION) >= '1.14'
assert_equal(expected, out)
else
assert_equal(expected + "=> nil\n", out)
end
assert_equal(expected, out)
end

def test_usage
Expand Down Expand Up @@ -121,13 +115,7 @@ def test_usage
out, err = execute_lines(%q{pa 42.abs})

assert_equal('', err)
# TODO: Remove this version guard after dropping to support irb 1.13.x
# https://github.com/ruby/irb/pull/972
if Gem::Version.new(IRB::VERSION) >= '1.14'
assert_equal(expected, out)
else
assert_equal(expected + "=> nil\n", out)
end
assert_equal(expected, out)
end

def test_help
Expand Down

0 comments on commit 10b35ee

Please sign in to comment.