From 02959389d1b34e941601a6ea66603b8421f54d39 Mon Sep 17 00:00:00 2001 From: "Matthew M. Keeler" Date: Mon, 15 Jul 2024 10:32:41 -0400 Subject: [PATCH] refactor: Remove unnecessary nil check on `EvaluationDetail.reason` (#289) --- lib/ldclient-rb/events.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ldclient-rb/events.rb b/lib/ldclient-rb/events.rb index 370ad28e..bb787fbe 100644 --- a/lib/ldclient-rb/events.rb +++ b/lib/ldclient-rb/events.rb @@ -513,13 +513,13 @@ def make_output_events(events, summary) evaluation: { key: event.key, value: event.evaluation.value, + reason: event.evaluation.reason, }, } out[:evaluation][:version] = event.version unless event.version.nil? out[:evaluation][:default] = event.default unless event.default.nil? out[:evaluation][:variation] = event.evaluation.variation_index unless event.evaluation.variation_index.nil? - out[:evaluation][:reason] = event.evaluation.reason unless event.evaluation.reason.nil? out[:samplingRatio] = event.sampling_ratio unless event.sampling_ratio.nil? || event.sampling_ratio == 1 measurements = []