2
votes

I'm using pry-byebug and want to write like this:

3.times do |i|
  next if i == 2
  p i
end

But this fails with a error:

[1] pry(main)*   next if i == 2
Error: Cannot find local context. Did you use `binding.pry`?

I know next is used in pry for step execution, that causes the error. Is there a way to circumvent the problem?

1

1 Answers