rails/rails — pull request #3908 by kennyj (2011-12-08 16:51:38+00:00)
Title: Fix a failure in railties on ruby 1.8.x

In Ruby 1.8.x, config.encoding sets $KCODE.
Therefore, the possible values are UTF8, SJIS, or EUC.
And, if we set SJIS, we'll has the error. Because some rails sources are written in utf-8 encoding.

I have tested this patch on ruby-1.9.2 and ree-2011.03