summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Keiser <john@johnkeiser.com>2015-09-01 14:00:44 -0700
committerJohn Keiser <john@johnkeiser.com>2015-09-01 19:30:53 -0700
commit86d422017d0d990ac396ac5109320a8a4bbbe878 (patch)
tree0185143d9ee592ade43906ce1277e9913677746a
parentf975355dc9cb9ef73ff86471a32bfac459efeb7a (diff)
downloadchef-86d422017d0d990ac396ac5109320a8a4bbbe878.tar.gz
Fix dispatching events to methods with arity < args
-rw-r--r--lib/chef/event_dispatch/dispatcher.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/event_dispatch/dispatcher.rb b/lib/chef/event_dispatch/dispatcher.rb
index 0f05365ab1..966a3f32ec 100644
--- a/lib/chef/event_dispatch/dispatcher.rb
+++ b/lib/chef/event_dispatch/dispatcher.rb
@@ -32,7 +32,7 @@ class Chef
mth = s.method(method_name)
# Trim arguments to match what the subscriber expects to allow
# adding new arguments without breaking compat.
- args = args.take(arity) if mth.arity < args.size && mth.arity >= 0
+ args = args.take(mth.arity) if mth.arity < args.size && mth.arity >= 0
mth.call(*args)
end
end