Skip to content

Commit

Permalink
Revert "Perf: refactor _assign method to avoid inject and defining un…
Browse files Browse the repository at this point in the history
…needed local var."

_assigns must return a hash.

This reverts commit e66c1ce.
  • Loading branch information
josevalim committed Oct 2, 2010
1 parent 87104a7 commit f9b5f63
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion actionpack/lib/action_view/test_case.rb
Expand Up @@ -189,7 +189,11 @@ def _instance_variables
end

def _assigns
_instance_variables.map { |var| [var[1..-1].to_sym, instance_variable_get(var)] }
_instance_variables.inject({}) do |hash, var|
name = var[1..-1].to_sym
hash[name] = instance_variable_get(var)
hash
end
end

def _routes
Expand Down

0 comments on commit f9b5f63

Please sign in to comment.