When running bundle exec guard
getting these warnings.
<main>:1: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
/home/workstation/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/pry-0.12.2/lib/pry/commands/whereami.rb:40: warning: in `eval'
<main>:1: warning: __LINE__ in eval may not return location in binding; use Binding#source_location instead
/home/workstation/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/pry-0.12.2/lib/pry/commands/whereami.rb:41: warning: in `eval'
<main>:1: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
/home/workstation/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/pry-0.12.2/lib/pry/method/weird_method_locator.rb:88: warning: in `eval'
<main>:1: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
/home/workstation/.rbenv/versions/2.7.0/lib/ruby/gems/2.7.0/gems/pry-0.12.2/lib/pry/method/weird_method_locator.rb:80: warning: in `eval'
Its clearly coming from pry gem & too frustrating to see these on all test runs. How can I hide this from showing?
This is a known upstream bug in Pry specific to Ruby 2.7. Given Pry hasn't been updated in a while, a suggested fix (which worked for me) is to pull Pry from GitHub:
# Gemfile
source 'https://rubygems.org'
gem 'pry', git: 'https://github.com/pry/pry.git', ref: '272b3290b5250d28ee82a5ff65aa3b29b825e37b'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With