Signed-off-by: Cao Xueliang caoxl78320@163.com --- src/scheduler/pp_params.cr | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/scheduler/pp_params.cr b/src/scheduler/pp_params.cr index da8d8f3..03bf0b8 100644 --- a/src/scheduler/pp_params.cr +++ b/src/scheduler/pp_params.cr @@ -50,10 +50,8 @@ class Job
private def format_string(original_str) temp = [] of String - original_str.each_char do |char| - if "#{char}" =~ /-|.|/|\w/ - temp << "#{char}".gsub("/", "-") - end + original_str.gsub('/', '-').each_char do |char| + temp << "#{char}" if "#{char}" =~ /\w|-|./ end
return temp.join()