Issue #3388 has been updated by Nobuyoshi Nakada.


Missed.

  def end_with?
    i = rindex(pattern) and ($& ? $~.end(0) : i + pattern.length) == length or false
  end

or

  def end_with?(pattern)
    if String === pattern
      !!index(pattern, -pattern.length)
    else
      rindex(pattern) and $~.end(0) == length or false
    end
  end

----------------------------------------
http://redmine.ruby-lang.org/issues/show/3388

----------------------------------------
http://redmine.ruby-lang.org