{"record":{"id":"e37af8c03d6c7eb3","repo":"redis/redis-rb","slug":"wrong-number-of-arguments-e37af8","errorCode":null,"errorMessage":"wrong number of arguments","messagePattern":"wrong number of arguments","errorType":"validation","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/redis/commands/sorted_sets.rb","lineNumber":72,"sourceCode":"        command = [:zadd, key]\n        command << \"NX\" if nx\n        command << \"XX\" if xx\n        command << \"LT\" if lt\n        command << \"GT\" if gt\n        command << \"CH\" if ch\n        command << \"INCR\" if incr\n\n        if args.size == 1 && args[0].is_a?(Array)\n          members_to_add = args[0]\n          return 0 if members_to_add.empty?\n\n          # Variadic: return float if INCR, integer if !INCR\n          send_command(command + members_to_add, &(incr ? Floatify : nil))\n        elsif args.size == 2\n          # Single pair: return float if INCR, boolean if !INCR\n          send_command(command + args, &(incr ? Floatify : Boolify))\n        else\n          raise ArgumentError, \"wrong number of arguments\"\n        end\n      end\n\n      # Increment the score of a member in a sorted set.\n      #\n      # @example\n      #   redis.zincrby(\"zset\", 32.0, \"a\")\n      #     # => 64.0\n      #\n      # @param [String] key\n      # @param [Float] increment\n      # @param [String] member\n      # @return [Float] score of the member after incrementing it\n      def zincrby(key, increment, member)\n        send_command([:zincrby, key, increment, member], &Floatify)\n      end\n\n      # Remove one or more members from a sorted set.","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/redis/redis-rb/blob/2ba9010b91dab9e0fde1fbae3a9aae003f8bc307/lib/redis/commands/sorted_sets.rb#L54-L90","documentation":"Error \"wrong number of arguments\" thrown in redis/redis-rb.","triggerScenarios":"Thrown at lib/redis/commands/sorted_sets.rb:72 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Call the method with the documented number of arguments; check the method signature for the correct arity.","Remove extra arguments or add the missing one at the call site."],"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"}