aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/integration.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-10-02 05:32:14 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-10-02 05:32:14 +0000
commit0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a (patch)
tree5778378eafcbdfa37c82c67be1566c76aca249be /actionpack/lib/action_controller/integration.rb
parent9264bdc8f618344307f07790a07a60dc04b80434 (diff)
downloadrails-0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a.tar.gz
rails-0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a.tar.bz2
rails-0ee1cb2cd32bfaf47deaf5440dd5b9cf0915ab6a.zip
Ruby 1.9 compat, consistent load paths
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/integration.rb')
-rw-r--r--actionpack/lib/action_controller/integration.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/actionpack/lib/action_controller/integration.rb b/actionpack/lib/action_controller/integration.rb
index 677d25b6c9..c981c56e01 100644
--- a/actionpack/lib/action_controller/integration.rb
+++ b/actionpack/lib/action_controller/integration.rb
@@ -83,7 +83,7 @@ module ActionController
# the helpers are made protected by default--we make them public for
# easier access during testing and troubleshooting.
- klass.send(:public, *Routing::Routes.named_routes.helpers)
+ klass.module_eval { public *Routing::Routes.named_routes.helpers }
@named_routes_configured = true
end
end
@@ -252,7 +252,7 @@ module ActionController
end
unless ActionController::Base.respond_to?(:clear_last_instantiation!)
- ActionController::Base.send(:include, ControllerCapture)
+ ActionController::Base.module_eval { include ControllerCapture }
end
ActionController::Base.clear_last_instantiation!
@@ -498,7 +498,7 @@ module ActionController
reset! unless @integration_session
# reset the html_document variable, but only for new get/post calls
@html_document = nil unless %w(cookies assigns).include?(method)
- returning @integration_session.send(method, *args) do
+ returning @integration_session.send!(method, *args) do
copy_session_variables!
end
end
@@ -522,11 +522,11 @@ module ActionController
self.class.fixture_table_names.each do |table_name|
name = table_name.tr(".", "_")
next unless respond_to?(name)
- extras.send(:define_method, name) { |*args| delegate.send(name, *args) }
+ extras.send!(:define_method, name) { |*args| delegate.send(name, *args) }
end
# delegate add_assertion to the test case
- extras.send(:define_method, :add_assertion) { test_result.add_assertion }
+ extras.send!(:define_method, :add_assertion) { test_result.add_assertion }
session.extend(extras)
session.delegate = self
session.test_result = @_result
@@ -540,16 +540,16 @@ module ActionController
def copy_session_variables! #:nodoc:
return unless @integration_session
%w(controller response request).each do |var|
- instance_variable_set("@#{var}", @integration_session.send(var))
+ instance_variable_set("@#{var}", @integration_session.send!(var))
end
end
# Delegate unhandled messages to the current session instance.
def method_missing(sym, *args, &block)
reset! unless @integration_session
- returning @integration_session.send(sym, *args, &block) do
+ returning @integration_session.send!(sym, *args, &block) do
copy_session_variables!
end
end
end
-end \ No newline at end of file
+end