Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep pry-stack-explorer available with Ruby 3.0 #55

Merged
merged 2 commits into from
Dec 31, 2020

Conversation

fursich
Copy link
Contributor

@fursich fursich commented Dec 31, 2020

Hi there,

Thanks a lot for maintaining this useful gem.

I happened to notice bundle install fails with this gem when I upgrade an application to Ruby3.
Looks like the dependent gem binding_of_caller has to be updated to 1.0.0 (the relevant PR can be found here)

Also as Ruby 2.7 no longer emits deprecation warnings by default, I placed an explicit setting to turn that on in test environment.

Please advise if there's something I'm missing. I'm happy to work on it if any.
Hope that helps!

@@ -5,6 +5,10 @@
require file
end

if RUBY_VERSION >= '2.7.2'
# NOTE: https://bugs.ruby-lang.org/issues/17000
Warning[:deprecated] = true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To keep warnings displayed in CI environment, we could either

  • setting environment var: RUBYOPTS='-W:deprecated',
  • or turn on Warning[:deprecated] at runtime

I had to choose the latter as the earlier approach is not accepted by Ruby < 2.7.2 (Ruby aborts as it is not a recognizable option).
This is necessary only after Ruby 2.7.2.

@@ -20,7 +20,7 @@ Gem::Specification.new do |s|

s.specification_version = 4

s.add_runtime_dependency 'binding_of_caller', '~> 0.7'
s.add_runtime_dependency 'binding_of_caller', '~> 1.0'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After upgrading binding._of_caller, I confirmed all the test passed green, at least at my end

@joallard
Copy link
Collaborator

Looks good to me, thanks!

@joallard joallard merged commit 7563df2 into pry:master Dec 31, 2020
@fursich
Copy link
Contributor Author

fursich commented Dec 31, 2020

@joallard Thanks for your swift action!

@fursich fursich deleted the ruby_3.0 branch December 31, 2020 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants