rails/rails — pull request #14602 by sadjow (2014-04-04 17:04:59+00:00)
Title: Use literal array of symbols for default protected instance variables

It is faster :rocket:

```ruby
require 'benchmark'

n = 50000
Benchmark.bm do |x|
x.report do
n.times do
%w(@_action_name @_response_body @_formats @_prefixes @_config
@_view_context_class @_view_renderer @_lookup_context
@_routes @_db_runtime
).map(&:to_sym)
end
end
x.report do
n.times do
%i(@_action_name @_response_body @_formats @_prefixes @_config
@_view_context_class @_view_renderer @_lookup_context
@_routes @_db_runtime
)
end
end
```

```
user system total real
0.170000 0.000000 0.170000 ( 0.172828)
0.010000 0.000000 0.010000 ( 0.014453)
```