lib/tempster.rb in automate-it-0.9.0 vs lib/tempster.rb in automate-it-0.9.1
- old
+ new
@@ -142,10 +142,10 @@
end
end
# Returns a string of random characters.
def self._armor_string(length=DEFAULT_ARMOR_LENGTH)
- (1..length).collect{ARMOR_CHARACTERS[rand(ARMOR_CHARACTERS.size)]}.pack("C*")
+ (0...length).map{ ARMOR_CHARACTERS[rand(ARMOR_CHARACTERS.size)] }.join
end
# Creates a temporary file.
def self.mktemp(opts={}, &block)
tempster({:kind => :file}.merge(opts), &block)