class Object

def __binding__

Return a binding object for the receiver.
def __binding__
  if is_a?(Module)
    return class_eval "binding"
  end
  unless respond_to? :__binding_impl__
    begin
      instance_eval %{
        def __binding_impl__
          binding
        end
      }
    rescue TypeError
      self.class.class_eval %{
        def __binding_impl__
          binding
        end
      }
    end
  end
  __binding_impl__
end

def pry(target=self)

Other tags:
    Example: Start a Pry session on current self (whatever that is) -
    Example: Second form -
    Example: First form -

Parameters:
  • target (Object, Binding) -- The receiver of the Pry session.
def pry(target=self)
  Pry.start(target)
end