class Pry::Code

def method_missing(method_name, *args, &block)

Forward any missing methods to the output of `#to_s`.
def method_missing(method_name, *args, &block)
  if (string = to_s).respond_to?(method_name)
    string.__send__(method_name, *args, &block)
  else
    super
  end
end