aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-09-27 10:38:37 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-09-27 10:38:37 +0000
commitb01a7c69fc8554c2e696609ea8ab76875d405165 (patch)
treebbccfb5c2e02b77cae64c5d644a6221dfc900371 /activesupport/lib
parent888603686737a6f692ca841a32b570056651c0e3 (diff)
downloadrails-b01a7c69fc8554c2e696609ea8ab76875d405165.tar.gz
rails-b01a7c69fc8554c2e696609ea8ab76875d405165.tar.bz2
rails-b01a7c69fc8554c2e696609ea8ab76875d405165.zip
Alias Object#send to send! for Ruby 1.9 forward compatibility.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7658 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/core_ext/object/misc.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/object/misc.rb b/activesupport/lib/active_support/core_ext/object/misc.rb
index b93db689a7..e46cfe1b9b 100644
--- a/activesupport/lib/active_support/core_ext/object/misc.rb
+++ b/activesupport/lib/active_support/core_ext/object/misc.rb
@@ -1,4 +1,9 @@
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