aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-06-17 03:01:57 +0000
committerRick Olson <technoweenie@gmail.com>2006-06-17 03:01:57 +0000
commitae0e1a0682c853d0cdc969a82cd23455b4d2ca3e (patch)
tree9e7f607f2fc78e91257880adc47686362d1a6948 /activesupport/lib/active_support/core_ext
parent2bbcff8cf4488c0f64bf5ac23e9b5a8eb13f07d5 (diff)
downloadrails-ae0e1a0682c853d0cdc969a82cd23455b4d2ca3e.tar.gz
rails-ae0e1a0682c853d0cdc969a82cd23455b4d2ca3e.tar.bz2
rails-ae0e1a0682c853d0cdc969a82cd23455b4d2ca3e.zip
Enhance Symbol#to_proc so it works with list objects, such as multi-dimensional arrays. Closes #5295 [nov@yo.rim.or.jp]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4455 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r--activesupport/lib/active_support/core_ext/symbol.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/symbol.rb b/activesupport/lib/active_support/core_ext/symbol.rb
index 3a412f647b..a3dc794db4 100644
--- a/activesupport/lib/active_support/core_ext/symbol.rb
+++ b/activesupport/lib/active_support/core_ext/symbol.rb
@@ -7,6 +7,6 @@ class Symbol
# # The same as people.select { |p| p.manager? }.collect { |p| p.salary }
# people.select(&:manager?).collect(&:salary)
def to_proc
- Proc.new { |obj, *args| obj.send(self, *args) }
+ Proc.new { |*args| args.shift.__send__(self, *args) }
end
end