aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/abstract_controller
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-11-20 02:28:58 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2010-11-20 02:29:57 -0200
commitd3f8765482133df14d355f1763d3df1c883d2689 (patch)
treebf1a96a12e817d6d7cb191781526053b063ce88a /actionpack/lib/abstract_controller
parent938243feb9ea177b84276821818c9eed66064340 (diff)
downloadrails-d3f8765482133df14d355f1763d3df1c883d2689.tar.gz
rails-d3f8765482133df14d355f1763d3df1c883d2689.tar.bz2
rails-d3f8765482133df14d355f1763d3df1c883d2689.zip
Avoid range object creation
Diffstat (limited to 'actionpack/lib/abstract_controller')
-rw-r--r--actionpack/lib/abstract_controller/rendering.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb
index ba31e2b1ea..91b75273fa 100644
--- a/actionpack/lib/abstract_controller/rendering.rb
+++ b/actionpack/lib/abstract_controller/rendering.rb
@@ -128,7 +128,7 @@ module AbstractController
hash = {}
variables = instance_variable_names
variables -= protected_instance_variables if respond_to?(:protected_instance_variables)
- variables.each { |name| hash[name.to_s[1..-1]] = instance_variable_get(name) }
+ variables.each { |name| hash[name.to_s[1, name.length]] = instance_variable_get(name) }
hash
end