X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=lib%2Fmcollective%2Frpc%2Freply.rb;h=0dc8b5a4dde22b7786e3f04793d284fcc8002ec9;hb=d1f1649ba43c5cbc43c4beb2380096ba051d646a;hp=574be55ef6c202a3dba6dcd9a13d22a478cfa334;hpb=b87d2f4e68281062df1913440ca5753ae63314a9;p=packages%2Fprecise%2Fmcollective.git diff --git a/lib/mcollective/rpc/reply.rb b/lib/mcollective/rpc/reply.rb index 574be55..0dc8b5a 100644 --- a/lib/mcollective/rpc/reply.rb +++ b/lib/mcollective/rpc/reply.rb @@ -26,7 +26,9 @@ module MCollective interface = @ddl.action_interface(@action) interface[:output].keys.each do |output| - @data[output] = interface[:output][output][:default] + # must deep clone this data to avoid accidental updates of the DDL in cases where the + # default is for example a string and someone does << on it + @data[output] = Marshal.load(Marshal.dump(interface[:output][output].fetch(:default, nil))) end end