From d3f8765482133df14d355f1763d3df1c883d2689 Mon Sep 17 00:00:00 2001
From: Santiago Pastorino <santiago@wyeworks.com>
Date: Sat, 20 Nov 2010 02:28:58 -0200
Subject: Avoid range object creation

---
 actionpack/lib/abstract_controller/rendering.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
 
-- 
cgit v1.2.3