From f7af5ee047dc210308361f42ceca6230fc904626 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Wed, 27 Mar 2024 02:33:14 +0200 Subject: [PATCH] Upgrade pry and pry-doc To the lowest compatible with Ruby 3.3 --- Gemfile | 6 ++---- Gemfile.lock | 26 ++++++++++++-------------- spec/robe/sash/doc_for_spec.rb | 7 ++----- 3 files changed, 16 insertions(+), 23 deletions(-) diff --git a/Gemfile b/Gemfile index bc03aa0..a6c92e6 100644 --- a/Gemfile +++ b/Gemfile @@ -2,11 +2,9 @@ source 'https://rubygems.org' gem 'rspec', '~> 3.4.0' gem 'rake', '~> 13.1' -gem 'pry', '~> 0.11.0' -gem 'pry-doc', '~> 0.9.0', require: false, platforms: :mri -gem 'method_source', '>= 0.8.2' +gem 'pry', '~> 0.14.2' +gem 'pry-doc', '~> 0.13.5', require: false, platforms: :mri gem 'activesupport', '~> 4.1.11' -gem 'yard', '~> 0.9.11' group :metrics do gem 'simplecov', require: false diff --git a/Gemfile.lock b/Gemfile.lock index 1899928..07c99c2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -15,19 +15,19 @@ GEM concurrent-ruby (~> 1.0) json (1.8.6) json (1.8.6-java) - method_source (0.9.2) + method_source (1.0.0) minitest (5.11.3) multi_json (1.14.1) - pry (0.11.3) - coderay (~> 1.1.0) - method_source (~> 0.9.0) - pry (0.11.3-java) - coderay (~> 1.1.0) - method_source (~> 0.9.0) + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + pry (0.14.2-java) + coderay (~> 1.1) + method_source (~> 1.0) spoon (~> 0.0) - pry-doc (0.9.0) - pry (~> 0.9) - yard (~> 0.8) + pry-doc (0.13.5) + pry (~> 0.11) + yard (~> 0.9.11) rake (13.1.0) rspec (3.4.0) rspec-core (~> 3.4.0) @@ -60,13 +60,11 @@ PLATFORMS DEPENDENCIES activesupport (~> 4.1.11) - method_source (>= 0.8.2) - pry (~> 0.11.0) - pry-doc (~> 0.9.0) + pry (~> 0.14.2) + pry-doc (~> 0.13.5) rake (~> 13.1) rspec (~> 3.4.0) simplecov - yard (~> 0.9.11) BUNDLED WITH 2.3.27 diff --git a/spec/robe/sash/doc_for_spec.rb b/spec/robe/sash/doc_for_spec.rb index e077d29..242447a 100644 --- a/spec/robe/sash/doc_for_spec.rb +++ b/spec/robe/sash/doc_for_spec.rb @@ -43,10 +43,8 @@ def foo; end end it "mentions pry-doc when relevant" do - val = Pry.config.has_pry_doc - Pry.config.has_pry_doc = false + hide_const('PryDoc') struct = described_class.method_struct(String.instance_method(:gsub)) - Pry.config.has_pry_doc = val if RUBY_ENGINE == "ruby" expect(struct.source).to be_nil @@ -57,8 +55,7 @@ def foo; end end end - # FIXME: Drop compatibility with Ruby < 2.3 and upgrade pry-doc and bundler. - context "native methods", RUBY_VERSION >= "2.4" && :skip do + context "native methods", RUBY_VERSION >= "2.6" && :skip do let(:c) { described_class } context "String#gsub info fields" do