deivid-rodriguez/pry-byebug

Ruby 2.6 warning (__FILE__ in eval)

semaperepelitsa opened this issue · 1 comments

See related issue in Pry: pry/pry#1871, pry/pry#1904 (not released yet)

When running Ruby 2.6 in verbose mode, it shows this warning:

env RUBYOPT="-w" bundle exec pry 
<main>:1: warning: __FILE__ in eval may not return location in binding; use Binding#source_location instead
[1] pry(main)> 
gem "pry", git: "https://github.com/pry/pry", ref: "69f7d9d185726abc4a84b3731f1735f501a81266"
gem "pry-byebug", "3.7.0"

If I remove pry-byebug gem, the warning disappears.

Culprits:

https://github.com/deivid-rodriguez/pry-byebug/blob/master/lib/pry-byebug/base.rb#L16

https://github.com/deivid-rodriguez/pry-byebug/blob/master/lib/pry-byebug/helpers/breakpoints.rb#L23

(BTW, running "pry" from master completely breaks with pry-byebug, but that's a separate issue.)

Made PR #246, hope it helps to solve this one.