Closed nepalez closed 7 years ago
Method GELF::Notifier.stringify_keys mutates its arguments which leads to mutating of arguments of the #notify invocations.
GELF::Notifier.stringify_keys
#notify
This behaviour is unsafe, and tbh not necessary, because the method returns processed hash, that could be a new object.
Previous behavior:
data = { foo: { bar: "BAZ" } } n = GELF::Notifier.new("localhost", 12201) n.notify!(:short_message => "foo", :full_message => "something here\n\nbacktrace?!", data) data # => { "foo" => { "bar" => "BAZ" } } # keys are stringified in the source hash
The new one:
data = { foo: { bar: "BAZ" } } n = GELF::Notifier.new("localhost", 12201) n.notify!(:short_message => "foo", :full_message => "something here\n\nbacktrace?!", data) data # => { foo: { bar: "BAZ" } } # the source hash not changed
All committers have signed the CLA.
Method
GELF::Notifier.stringify_keys
mutates its arguments which leads to mutating of arguments of the#notify
invocations.This behaviour is unsafe, and tbh not necessary, because the method returns processed hash, that could be a new object.
Previous behavior:
The new one: