From 859f7344615d2d95195f6a07e528841f28ba9744 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Sun, 18 Feb 2007 10:51:43 +0000 Subject: Minor optimization to Auth.random_password --- lib/rbot/botuser.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rbot') diff --git a/lib/rbot/botuser.rb b/lib/rbot/botuser.rb index 4e35e5f3..bed2b627 100644 --- a/lib/rbot/botuser.rb +++ b/lib/rbot/botuser.rb @@ -34,8 +34,8 @@ module Irc # def Auth.random_password(l=8) pwd = "" - 8.times do - pwd += (rand(26) + (rand(2) == 0 ? 65 : 97) ).chr + l.times do + pwd << (rand(26) + (rand(2) == 0 ? 65 : 97) ).chr end return pwd end -- cgit v1.2.3