class String

:nodoc:

def end_with?(str) #:nodoc:

:nodoc:
1.9
RubyPython incorrectly to expects String#end_with? to exist.
:nodoc:
def end_with?(str) #:nodoc:
  str = str.to_str
  tail = self[-str.length, str.length]
  tail == str
end

def indent(n)

:nodoc:
def indent(n)
  if n >= 0
    gsub(/^/, ' ' * n)
  else
    gsub(/^ {0,#{-n}}/, "")
  end
end