From e43dbb0962eb065e8e8be59fcacd1068bd62519e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Luis=20Leal=20Cardoso=20Junior?= Date: Wed, 9 Mar 2022 19:01:20 -0300 Subject: Remove support for Ruby 1.9.3 --- spec/commands/edit_spec.rb | 8 +------- spec/editor_spec.rb | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) (limited to 'spec') diff --git a/spec/commands/edit_spec.rb b/spec/commands/edit_spec.rb index c51cc59d..cc40bd0e 100644 --- a/spec/commands/edit_spec.rb +++ b/spec/commands/edit_spec.rb @@ -23,13 +23,7 @@ describe "edit" do before do # OS-specific tempdir name. For GNU/Linux it's "tmp", for Windows it's # something "Temp". - @tf_dir = - if Pry::Helpers::Platform.mri_19? - Pathname.new(Dir::Tmpname.tmpdir) - else - Pathname.new(Dir.tmpdir) - end - + @tf_dir = Pathname.new(Dir.tmpdir) @tf_path = File.expand_path(File.join(@tf_dir.to_s, 'bar.rb')) FileUtils.touch(@tf_path) end diff --git a/spec/editor_spec.rb b/spec/editor_spec.rb index 2005bf1c..a89edfd9 100644 --- a/spec/editor_spec.rb +++ b/spec/editor_spec.rb @@ -6,13 +6,7 @@ describe Pry::Editor do before do # OS-specific tempdir name. For GNU/Linux it's "tmp", for Windows it's # something "Temp". - @tf_dir = - if Pry::Helpers::Platform.mri_19? - Pathname.new(Dir::Tmpname.tmpdir) - else - Pathname.new(Dir.tmpdir) - end - + @tf_dir = Pathname.new(Dir.tmpdir) @tf_path = File.join(@tf_dir.to_s, 'hello world.rb') @editor = Pry::Editor.new(Pry.new) -- cgit v1.2.1 From b2f8820a5b1539c16ce0e6005f382a3abcfef76d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Luis=20Leal=20Cardoso=20Junior?= Date: Wed, 9 Mar 2022 19:27:12 -0300 Subject: Support jruby >= 9.0.0 --- spec/pryrc_spec.rb | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'spec') diff --git a/spec/pryrc_spec.rb b/spec/pryrc_spec.rb index 59f2eed9..e5bfe259 100644 --- a/spec/pryrc_spec.rb +++ b/spec/pryrc_spec.rb @@ -24,16 +24,13 @@ describe Pry do expect(TEST_RC).to eq [0] end - # Resolving symlinks doesn't work on jruby 1.9 [jruby issue #538] - unless Pry::Helpers::Platform.jruby_19? - it "should not load the rc file twice if it's symlinked differently" do - Pry.config.rc_file = 'spec/fixtures/testrc' - stub_const('Pry::LOCAL_RC_FILE', 'spec/fixtures/testlinkrc') + it "should not load the rc file twice if it's symlinked differently" do + Pry.config.rc_file = 'spec/fixtures/testrc' + stub_const('Pry::LOCAL_RC_FILE', 'spec/fixtures/testlinkrc') - Pry.start(self, input: StringIO.new("exit-all\n"), output: StringIO.new) + Pry.start(self, input: StringIO.new("exit-all\n"), output: StringIO.new) - expect(TEST_RC).to eq [0] - end + expect(TEST_RC).to eq [0] end it "should not load the pryrc if pryrc's directory permissions do not allow this" do -- cgit v1.2.1 From 4482640fadbbb422db05d89ddbe82b97a945e999 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Luis=20Leal=20Cardoso=20Junior?= Date: Wed, 9 Mar 2022 19:37:15 -0300 Subject: Remove more 1.9 related workarounds --- spec/exception_handler_spec.rb | 2 +- spec/integration/hanami_spec.rb | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'spec') diff --git a/spec/exception_handler_spec.rb b/spec/exception_handler_spec.rb index b1608509..c9f082f6 100644 --- a/spec/exception_handler_spec.rb +++ b/spec/exception_handler_spec.rb @@ -47,7 +47,7 @@ RSpec.describe Pry::ExceptionHandler do end before do - if RUBY_VERSION.start_with?('1.9', '2.0') + if RUBY_VERSION.start_with?('2.0') skip("Ruby #{RUBY_VERSION} doesn't support nested exceptions") end end diff --git a/spec/integration/hanami_spec.rb b/spec/integration/hanami_spec.rb index 5fae6ef8..71f89ab9 100644 --- a/spec/integration/hanami_spec.rb +++ b/spec/integration/hanami_spec.rb @@ -10,9 +10,6 @@ RSpec.describe "Hanami integration" do end it "does not enter an infinite loop (#1471, #1621)" do - if RUBY_VERSION.start_with? "1.9" - skip "prepend is not supported on this version of Ruby" - end code = <<-RUBY require "pry" require "timeout" -- cgit v1.2.1