From 8356ecfda87d3a89e8e59ac0226e84170aa32d34 Mon Sep 17 00:00:00 2001 From: Matt Ranney Date: Thu, 30 Sep 2010 09:02:20 -0700 Subject: [PATCH] Simplify lowercase command prototype. Suggested by Rasmus Andersson --- index.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/index.js b/index.js index a13f791f16..c84fa02a36 100644 --- a/index.js +++ b/index.js @@ -699,12 +699,7 @@ exports.commands.forEach(function (command) { args.unshift(command); // put command at the beginning this.send_command.apply(this, args); }; - // same as above, but command is lower case - RedisClient.prototype[command.toLowerCase()] = function () { - var args = to_array(arguments); - args.unshift(command); // put command at the beginning - this.send_command.apply(this, args); - }; + RedisClient.prototype[command.toLowerCase()] = RedisClient.prototype[command]; }); function Multi(client, args) {