vendor/ruby/2.7.0/gems/byebug-11.1.3/ext/byebug/context.c
/*
 *  call-seq:
 *    context.step_out(n_frames = 1, force = false)
 *
 *  Stops after +n_frames+ frames are finished. +force+ parameter (if true)
 *  ensures that the execution will stop in the specified frame even when there
 *  are no more instructions to run. In that case, it will stop when the return
 *  event for that frame is triggered.
 */


Stops after +n_frames+ frames are finished. +force+ parameter (if true)
ensures that the execution will stop in the specified frame even when there
are no more instructions to run. In that case, it will stop when the return
event for that frame is triggered.
Stops after + n_frames + frames are finished . + force + parameter ( if true ) ensures that the execution will stop in the specified frame even when there are no more instructions to run . In that case it will stop when the return event for that frame is triggered .
static VALUE
Context_step_out(int argc, VALUE *argv, VALUE self)
{
  int n_args, n_frames;
  VALUE v_frames, force;
  debug_context_t *context;
  n_args = rb_scan_args(argc, argv, "02", &v_frames, &force);
  n_frames = n_args == 0 ? 1 : FIX2INT(v_frames);
  Data_Get_Struct(self, debug_context_t, context);
  if (n_frames < 0 || n_frames > context->calced_stack_size)
    rb_raise(rb_eRuntimeError,
             "You want to finish %d frames, but stack size is only %d",
             n_frames, context->calced_stack_size);
  context->steps_out = n_frames;
  if (n_args == 2 && RTEST(force))
    CTX_FL_SET(context, CTX_FL_STOP_ON_RET);
  else
    CTX_FL_UNSET(context, CTX_FL_STOP_ON_RET);
  return Qnil;
}
static VALUE Context_step_out ( int argc , VALUE * argv , VALUE self ) { int n_args , n_frames ; VALUE v_frames , force ; debug_context_t * context ; n_args = rb_scan_args ( argc , argv , " " , & v_frames , & force ) ; n_frames = n_args == 0 ? 1 : FIX2INT ( v_frames ) ; Data_Get_Struct ( self , debug_context_t , context ) ; if ( n_frames < 0 || n_frames > context -> calced_stack_size ) rb_raise ( rb_eRuntimeError , " " , n_frames , context -> calced_stack_size ) ; context -> steps_out = n_frames ; if ( n_args == 2 && RTEST ( force ) ) CTX_FL_SET ( context , CTX_FL_STOP_ON_RET ) ; else CTX_FL_UNSET ( context , CTX_FL_STOP_ON_RET ) ; return Qnil ; }
call-seq:
    context.step_out(n_frames = 1, force = false)
call - seq : context . step_out ( n_frames = 1 force = false )