aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-08-31 13:15:26 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-08-31 13:20:15 -0700
commita1eb4e11c2cccb91483fa15f1a1a0b2ae518d2cf (patch)
treeef09df0f7118b04e8964753b83499ccf027bba1a /activesupport/lib/active_support
parente9a8e0053be3b293ab89fb584f1d660063f107aa (diff)
downloadrails-a1eb4e11c2cccb91483fa15f1a1a0b2ae518d2cf.tar.gz
rails-a1eb4e11c2cccb91483fa15f1a1a0b2ae518d2cf.tar.bz2
rails-a1eb4e11c2cccb91483fa15f1a1a0b2ae518d2cf.zip
Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, but it has since been removed from 1.9.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> Conflicts: actionpack/test/controller/layout_test.rb
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r--activesupport/lib/active_support/core_ext/object/misc.rb5
-rw-r--r--activesupport/lib/active_support/core_ext/time/zones.rb2
-rw-r--r--activesupport/lib/active_support/option_merger.rb2
-rw-r--r--activesupport/lib/active_support/testing/core_ext/test/unit/assertions.rb6
-rw-r--r--activesupport/lib/active_support/time_with_zone.rb2
5 files changed, 8 insertions, 9 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/misc.rb b/activesupport/lib/active_support/core_ext/object/misc.rb
index 8384a12327..06a7d05702 100644
--- a/activesupport/lib/active_support/core_ext/object/misc.rb
+++ b/activesupport/lib/active_support/core_ext/object/misc.rb
@@ -1,9 +1,4 @@
class Object
- unless respond_to?(:send!)
- # Anticipating Ruby 1.9 neutering send
- alias send! send
- end
-
# A Ruby-ized realization of the K combinator, courtesy of Mikael Brockman.
#
# def foo
diff --git a/activesupport/lib/active_support/core_ext/time/zones.rb b/activesupport/lib/active_support/core_ext/time/zones.rb
index 079ecdd48e..9d8eb73908 100644
--- a/activesupport/lib/active_support/core_ext/time/zones.rb
+++ b/activesupport/lib/active_support/core_ext/time/zones.rb
@@ -78,7 +78,7 @@ module ActiveSupport #:nodoc:
#
# Time.utc(2000).in_time_zone('Alaska') # => Fri, 31 Dec 1999 15:00:00 AKST -09:00
def in_time_zone(zone = ::Time.zone)
- ActiveSupport::TimeWithZone.new(utc? ? self : getutc, ::Time.send!(:get_zone, zone))
+ ActiveSupport::TimeWithZone.new(utc? ? self : getutc, ::Time.__send__(:get_zone, zone))
end
end
end
diff --git a/activesupport/lib/active_support/option_merger.rb b/activesupport/lib/active_support/option_merger.rb
index c77bca1ac9..b563b093ed 100644
--- a/activesupport/lib/active_support/option_merger.rb
+++ b/activesupport/lib/active_support/option_merger.rb
@@ -11,7 +11,7 @@ module ActiveSupport
private
def method_missing(method, *arguments, &block)
arguments << (arguments.last.respond_to?(:to_hash) ? @options.deep_merge(arguments.pop) : @options.dup)
- @context.send!(method, *arguments, &block)
+ @context.__send__(method, *arguments, &block)
end
end
end
diff --git a/activesupport/lib/active_support/testing/core_ext/test/unit/assertions.rb b/activesupport/lib/active_support/testing/core_ext/test/unit/assertions.rb
index 70a44eab8c..63d1ba6507 100644
--- a/activesupport/lib/active_support/testing/core_ext/test/unit/assertions.rb
+++ b/activesupport/lib/active_support/testing/core_ext/test/unit/assertions.rb
@@ -36,7 +36,11 @@ module Test
# post :delete, :id => ...
# end
def assert_difference(expressions, difference = 1, message = nil, &block)
- expression_evaluations = Array(expressions).collect{ |expression| lambda { eval(expression, block.send!(:binding)) } }
+ expression_evaluations = Array(expressions).map do |expression|
+ lambda do
+ eval(expression, block.__send__(:binding))
+ end
+ end
original_values = expression_evaluations.inject([]) { |memo, expression| memo << expression.call }
yield
diff --git a/activesupport/lib/active_support/time_with_zone.rb b/activesupport/lib/active_support/time_with_zone.rb
index 4866fa0dc8..75591b7c34 100644
--- a/activesupport/lib/active_support/time_with_zone.rb
+++ b/activesupport/lib/active_support/time_with_zone.rb
@@ -275,7 +275,7 @@ module ActiveSupport
end
def marshal_load(variables)
- initialize(variables[0].utc, ::Time.send!(:get_zone, variables[1]), variables[2].utc)
+ initialize(variables[0].utc, ::Time.__send__(:get_zone, variables[1]), variables[2].utc)
end
# Ensure proxy class responds to all methods that underlying time instance responds to.