On Jun 4, 2010, at 5:24 AM, Thomas Sawyer wrote:

> But #end_with? is more difficult, and I had to use regular =
expressions.
>=20
>    def end_with?(suffix)
>      suffix =3D Regexp.escape(suffix) if String=3D=3D=3Dsuffix
>      /#{suffix}$/.match(self) ? true : false
>    end

$ does not mean the end of the data in a regular expression.  It means =
the end of the line.

\z would be more correct.

James Edward Gray II=