Is it a sane idea to add to_an? as an alias to to_a?

As far as I am concerned, Rails try to be as clear and readable as possible in the means of DSL practices. They give the developer all tools for his code to be read like English. We even have aliases like “days” and “minutes” to “day” and “minute” to make forms like 5.days to be read more naturally.

Writing something like “is_a? Integer” doesn’t sound really euphonic to my ear and mind. “is_an? Integer” sounds much better.

Is it OK to submit such a pull request as a part of ActiveSupport core extensions?

Ruby used to have `exists?` and `exist?`. The former was deprecatted even that in some care it is more natual to read.

I’d follow the same rule here. I believe consistence is more important than readability in this case. It make code easier to search, since you only need to search for `is_a?` and not `is_an?` and it doesn’t introdoce the overhead of having to change which method you use when you rename the constant.

Rafael França