Skip to content

Commit

Permalink
配列の生成を Array.new で行うように修正
Browse files Browse the repository at this point in the history
  • Loading branch information
TakuyaNoguchi committed May 19, 2022
1 parent 79ddb79 commit 7d6d87c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bizside/string_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def self.create_random_alpha_string length, case_sensitive = false
chars += ('A'..'Z').to_a if case_sensitive
chars_length = chars.length

length.times.map { chars[rand(chars_length)] }.join
Array.new(length) { chars[rand(chars_length)] }.join
end

def self.create_random_string(number)
Expand Down

0 comments on commit 7d6d87c

Please sign in to comment.