aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext
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/test/core_ext
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/test/core_ext')
-rw-r--r--activesupport/test/core_ext/hash_ext_test.rb8
-rw-r--r--activesupport/test/core_ext/object_and_class_ext_test.rb5
2 files changed, 4 insertions, 9 deletions
diff --git a/activesupport/test/core_ext/hash_ext_test.rb b/activesupport/test/core_ext/hash_ext_test.rb
index fc8ed45358..52ea5f9013 100644
--- a/activesupport/test/core_ext/hash_ext_test.rb
+++ b/activesupport/test/core_ext/hash_ext_test.rb
@@ -62,7 +62,7 @@ class HashExtTest < Test::Unit::TestCase
@symbols = @symbols.with_indifferent_access
@mixed = @mixed.with_indifferent_access
- assert_equal 'a', @strings.send!(:convert_key, :a)
+ assert_equal 'a', @strings.__send__(:convert_key, :a)
assert_equal 1, @strings.fetch('a')
assert_equal 1, @strings.fetch(:a.to_s)
@@ -75,9 +75,9 @@ class HashExtTest < Test::Unit::TestCase
hashes.each do |name, hash|
method_map.sort_by { |m| m.to_s }.each do |meth, expected|
- assert_equal(expected, hash.send!(meth, 'a'),
+ assert_equal(expected, hash.__send__(meth, 'a'),
"Calling #{name}.#{meth} 'a'")
- assert_equal(expected, hash.send!(meth, :a),
+ assert_equal(expected, hash.__send__(meth, :a),
"Calling #{name}.#{meth} :a")
end
end
@@ -733,7 +733,7 @@ class HashToXmlTest < Test::Unit::TestCase
def test_empty_string_works_for_typecast_xml_value
assert_nothing_raised do
- Hash.send!(:typecast_xml_value, "")
+ Hash.__send__(:typecast_xml_value, "")
end
end
diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb
index b0a746fdc7..e88dcb52d5 100644
--- a/activesupport/test/core_ext/object_and_class_ext_test.rb
+++ b/activesupport/test/core_ext/object_and_class_ext_test.rb
@@ -108,11 +108,6 @@ class ClassExtTest < Test::Unit::TestCase
end
class ObjectTests < Test::Unit::TestCase
- def test_send_bang_aliases_send_before_19
- assert_respond_to 'a', :send!
- assert_equal 1, 'a'.send!(:size)
- end
-
def test_suppress_re_raises
assert_raises(LoadError) { suppress(ArgumentError) {raise LoadError} }
end