<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,15 +1,9 @@
-#!/opt/local/bin/ruby
+#!/usr/bin/env ruby
 
-%w( rubygems active_support optparse ostruct ).each {|l| require l}
-
-module Enumerable
-  def shuffle
-    sort_by { rand }
-  end
-end
+%w( rubygems optparse ).each &amp;method(:require)
 
 class PassGrid
-  ALPHANUMERIC = ('A'..'Z').to_a + (0..9).to_a.map(&amp;:to_s)
+  ALPHANUMERIC = ('A'..'Z').to_a + (0..9).to_a.map {|i| i.to_s }
   EXTENDED     = ALPHANUMERIC + %w( + - = _ ! / &lt; &gt; @ # $ % ^ &amp; * \ ; : . , )
 
   def initialize(width, height, extended_charset = false, label = nil)
@@ -34,12 +28,12 @@ class PassGrid
     def populate
       @height.times do
         @rows &lt;&lt; []
-        @width.times { @rows.last &lt;&lt; characters.shuffle.last.gsub(/\s+/, &quot;&quot;) }
+        @width.times { @rows.last &lt;&lt; characters.sort_by { rand }.last.gsub(/\s+/, &quot;&quot;) }
       end
     end
     def characters=(charset)
       @charset = ALPHANUMERIC
-      return if charset.blank?
+      return if charset.nil? || charset.empty?
 
       @charset += case charset
         when String then charset.split(&quot;&quot;).uniq</diff>
      <filename>passgen</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9cbd966a1703b9c7c6fde512676303ce47be23ad</id>
    </parent>
  </parents>
  <author>
    <name>Nicol&#225;s Sanguinetti</name>
    <email>contacto@nicolassanguinetti.info</email>
  </author>
  <url>http://github.com/sabman/utility_scripts/commit/898b31fd7d662efefcaaccf806dec05dc63ed0d5</url>
  <id>898b31fd7d662efefcaaccf806dec05dc63ed0d5</id>
  <committed-date>2008-03-24T14:58:17-07:00</committed-date>
  <authored-date>2008-03-24T14:58:17-07:00</authored-date>
  <message>Cleaned up old dependencies in passgen</message>
  <tree>5004c5aac7be23b7f6512f04723d7a265df1dafc</tree>
  <committer>
    <name>Nicol&#225;s Sanguinetti</name>
    <email>contacto@nicolassanguinetti.info</email>
  </committer>
</commit>
