{"record":{"id":"9bd15ded26b34677","repo":"redis/redis-rb","slug":"timeout-must-be-an-integer-or-float-got-timeou","errorCode":null,"errorMessage":"timeout must be an Integer or Float, got: #{timeout.class}","messagePattern":"timeout must be an Integer or Float, got: #(.+?)","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/redis/commands/lists.rb","lineNumber":392,"sourceCode":"      # @param [String] key\n      # @param [Integer] start start index\n      # @param [Integer] stop stop index\n      # @return [String] `OK`\n      def ltrim(key, start, stop)\n        send_command([:ltrim, key, Integer(start), Integer(stop)])\n      end\n\n      private\n\n      def _bpop(cmd, args, &blk)\n        timeout = if args.last.is_a?(Hash)\n          options = args.pop\n          options[:timeout]\n        end\n\n        timeout ||= 0\n        unless timeout.is_a?(Integer) || timeout.is_a?(Float)\n          raise ArgumentError, \"timeout must be an Integer or Float, got: #{timeout.class}\"\n        end\n\n        args.flatten!(1)\n        command = [cmd].concat(args)\n        command << timeout\n        send_blocking_command(command, timeout, &blk)\n      end\n\n      def _movem_amount_args(count, exactly, order)\n        raise ArgumentError, \"Pick either count or exactly, not both\" if count && exactly\n\n        if count || exactly\n          order = order.to_s.upcase\n          raise ArgumentError, \"order must be 'OBO' or 'BULK'\" if order != \"OBO\" && order != \"BULK\"\n\n          [count ? \"COUNT\" : \"EXACTLY\", Integer(count || exactly), order]\n        elsif order\n          raise ArgumentError, \"order requires count or exactly\"","sourceCodeStart":374,"sourceCodeEnd":410,"githubUrl":"https://github.com/redis/redis-rb/blob/2ba9010b91dab9e0fde1fbae3a9aae003f8bc307/lib/redis/commands/lists.rb#L374-L410","documentation":"Error \"timeout must be an Integer or Float, got: #{timeout.class}\" thrown in redis/redis-rb.","triggerScenarios":"Thrown at lib/redis/commands/lists.rb:392 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the timeout as an Integer or Float number of seconds, e.g. timeout: 5 or timeout: 0.5.","Convert the value before calling, e.g. timeout: timeout.to_f, if it comes in as a string."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2ba9010b91dab9e0fde1fbae3a9aae003f8bc307","analyzedAt":"2026-08-23T03:54:57.017Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}