pry-byebug icon indicating copy to clipboard operation
pry-byebug copied to clipboard

NameError: undefined local variable or method `text' for #<PryByebug::BreakCommand

Open kikonen opened this issue 2 years ago • 2 comments

break --show 1
NameError: undefined local variable or method `text' for #<PryByebug::BreakCommand:0x00007fb8190a59a0 @context={:target=>#<Binding:0x00007fb819b5be08>, :output=>#<Pry::Output:0x00007fb819057d68 @output=#<IO:<STDOUT>>, @color=false>, :eval_string=>"", :pry_instance=>#<Pry:0x00005568ac8d17f0 @binding_stack=[#<Bin....

Causes problems if trying to use breakpoints, since listing of them is not working

kikonen avatar Jun 07 '22 10:06 kikonen

It looks like this monkey patch fixes it

module PryByebug
  module Helpers
    module Breakpoints
      def text
        Pry::Helpers::Text
      end
    end
  end
end

kikonen avatar Jun 08 '22 09:06 kikonen

Aslo getting this:

[1] pry(#<Solicitations::Document>)> break 182
NameError: undefined local variable or method `text' for #<PryByebug::BreakCommand:0x00007fa9221f1698>
Did you mean?  test
from /Users/danny/.rbenv/versions/2.6.4/lib/ruby/gems/2.6.0/gems/pry-byebug-3.8.0/lib/pry-byebug/helpers/breakpoints.rb:42:in `print_full_breakpoint'

I'm on 3.8.0 however, and perhaps this has been fixed with this commit? https://github.com/deivid-rodriguez/pry-byebug/commit/d634bc069a061b3977b523d637bd98d81912edb0

danman01 avatar Dec 09 '22 20:12 danman01