Commit 63689006 authored by Andrew Newdigate's avatar Andrew Newdigate Committed by Kamil Trzciński
Browse files

Fix for application crash on numeric arguments in Redis

parent 02e046db
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -75,7 +75,7 @@ module Labkit
          return "*****" if command_is_sensitive?(command_name)

          return "nil" if first_argument.nil?
          return first if first_argument.is_a?(Numeric)
          return first_argument if first_argument.is_a?(Numeric)
          return "*****" unless first_argument.is_a?(String)

          mask_redis_arg(first_argument)
+3 −0
Original line number Diff line number Diff line
@@ -50,6 +50,9 @@ describe Labkit::Tracing::Redis::RedisInterceptorHelper do
      [nil, "value"] | "nil value"
      nil | ""
      false | ""
      [:get, 1] | "get 1"
      [:get, 1.0] | "get 1.0"
      [:get, 1, "two"] | "get 1 ...1 more value(s)"
    end

    with_them do