Q:

Proc.new binding change and loops logic abstraction

I've two loops in two different methods which look very similar.  I wanted to abstract most of their logic in a Proc.new
This works
def matches_base? 
  proc_exec = Proc.new do |subclass, breakpoint|
    # next and return are meant to act inside the loop and quit it if needed
    response = process_match(subclass)
    next if response == :continue
    return true if response == false

    return response
  end

  subclasses(BASE_NAMESPACE).each do |subclass|
    proc_exec.call(subclass)
  end
  false
end

The obvious issue here is the proc_exec is defined inside the method itself, but I want to use it in another method
def matches_breakpoints? 
  breakpoints.fetch.each do |breakpoint|
    # I want to include the proc_exec here too
  end
  false
end

So I just tried to extract it at the class level like so
This does not work
def proc_exec
  Proc.new do |subclass, breakpoint|
    response = process_match(subclass)
    next if response == :continue
    return true if response == false

    return response
  end
end

def matches_base? 
  subclasses(BASE_NAMESPACE).each do |subclass|
    proc_exec.call(subclass)
  end
  false
end

Then I could have called it like proc_exec.call from within both instance methods.  Currently it throws
 LocalJumpError:
   unexpected return

I tried many tricks such as instance_eval or instance_exec without success.  I'm out of solution right now. 

Easily executable, simplified example of what I want below. 
class MyLoops
  def proc_exec
    Proc.new do |num|
      next if num == 1
      # we want this `return` to act in the method context
      # as it would do if I defined it inside a method directly
      return if num == 4
      puts "Current number : #{num}"
    end
  end

  def method_a
    [0,1,2].each do |num|
      proc_exec.call(num)
    end
    false
  end

  def method_b
    [3,4,5].each do |num|
      proc_exec.call(num)
    end
  end
  # this `false` below should never be reached ; that's the trick
  false
end

loops = MyLoops.new
loops.method_a
loops.method_b

A:

You can't have your cake and eat it too.  If you want return from the proc to abort the method, it must be in the method's lexical scope* (which is another way to say "it must be defined within the same method"). 
An alternative is to have proc/lambda return a "stop" value, which caller will use to abort its execution. 
(Your experiments with instance_eval/instance_exec were misdirected, sadly.  Those methods only change current self.  This problem has nothing to do with current self, but rather current lexical scope, in which return is executed.) 

* The error you're getting, it is caused by return trying to return from a method that is no longer running (proc_exec).