Puppet::Transaction::Event#initialize() contained unnecessary code
that allowed the properties of an event to be passed in as separate
arguments.  This was never used.

Paired-with: Matt Robinson <[email protected]>
Signed-off-by: Paul Berry <[email protected]>
---
 lib/puppet/transaction/event.rb |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/lib/puppet/transaction/event.rb b/lib/puppet/transaction/event.rb
index 64980f1..cd695cf 100644
--- a/lib/puppet/transaction/event.rb
+++ b/lib/puppet/transaction/event.rb
@@ -16,10 +16,9 @@ class Puppet::Transaction::Event
 
   EVENT_STATUSES = %w{noop success failure audit}
 
-  def initialize(*args)
+  def initialize(options = {})
     @audited = false
-    options = args.last.is_a?(Hash) ? args.pop : ATTRIBUTES.inject({}) { 
|hash, attr| hash[attr] = args.pop; hash }
-    options.each { |attr, value| send(attr.to_s + "=", value) unless 
value.nil? }
+    options.each { |attr, value| send(attr.to_s + "=", value) }
 
     @time = Time.now
   end
-- 
1.7.2

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to