rails/rails — pull request #7129 by kennyj (2012-07-22 15:12:35+00:00)
Title: Improve error handling when using partial name with hyphen. #7079

Please see #7079.

I know this isn't perfect fixing (I don't fix the original issue, when using other invalid characters).
But in the current behavior, we'll be confused by the error message, and we sometimes use a filename with hyphen.