rails/rails — pull request #10852 by ka8725 (2013-06-05 11:15:15+00:00)
Title: Use is_a? method instead of === on string comparison

I don't see any reason to use `===` here - it's not obvious that you check instance of the object and also `is_a?` works faster.

Benchmark:

```ruby
require 'benchmark'

n = 100000

Benchmark.bmbm do |x|
x.report(:===) { n.times { 'a' === String } }
x.report(:is_a?) { 'a'.is_a?(String) }
end
```

```
Rehearsal -----------------------------------------
=== 0.030000 0.000000 0.030000 ( 0.024191)
is_a? 0.000000 0.000000 0.000000 ( 0.000004)
-------------------------------- total: 0.030000sec

user system total real
=== 0.030000 0.000000 0.030000 ( 0.027194)
is_a? 0.000000 0.000000 0.000000 ( 0.000006)
```