Skip to content
Browse files

test deprecated instance variables using to_s instead of inspect whic…

…h touches other ivars

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5320 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 301f721 commit a0f74092a8fa1eff96de67b70c711fd8408a4ab5 @jeremy jeremy committed Oct 18, 2006
View
6 actionpack/test/controller/deprecated_instance_variables_test.rb
@@ -12,9 +12,9 @@ def noop
end
ActionController::Base::DEPRECATED_INSTANCE_VARIABLES.each do |var|
- class_eval "def old_#{var}; render :text => @#{var}.inspect end"
- class_eval "def new_#{var}; render :text => #{var}.inspect end"
- class_eval "def internal_#{var}; render :text => @_#{var}.inspect end"
+ class_eval "def old_#{var}; render :text => @#{var}.to_s end"
+ class_eval "def new_#{var}; render :text => #{var}.to_s end"
+ class_eval "def internal_#{var}; render :text => @_#{var}.to_s end"
end
def rescue_action(e) raise e end
View
4 actionpack/test/template/deprecated_instance_variables_test.rb
@@ -8,8 +8,8 @@ def self.controller_path; 'deprecated_instance_variables' end
ActionController::Base::DEPRECATED_INSTANCE_VARIABLES.each do |var|
class_eval <<-end_eval
- def old_#{var}_inline; render :inline => '<%= @#{var}.inspect %>' end
- def new_#{var}_inline; render :inline => '<%= #{var}.inspect %>' end
+ def old_#{var}_inline; render :inline => '<%= @#{var}.to_s %>' end
+ def new_#{var}_inline; render :inline => '<%= #{var}.to_s %>' end
def old_#{var}_partial; render :partial => '#{var}_ivar' end
def new_#{var}_partial; render :partial => '#{var}_method' end
end_eval

0 comments on commit a0f7409

Please sign in to comment.
Something went wrong with that request. Please try again.