]> source.dussan.org Git - redmine.git/commitdiff
remove spaces inside {} of lib/redmine/core_ext/string/conversions.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 15 Nov 2020 12:37:17 +0000 (12:37 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Sun, 15 Nov 2020 12:37:17 +0000 (12:37 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20387 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/core_ext/string/conversions.rb

index c52b334e416fac4a2594311ea0a28d14e4eb20aa..d125448bdbf36a3d945e3e73c464fa185c3c714f 100644 (file)
@@ -33,9 +33,9 @@ module Redmine
             s = $1
           else
             # 2:30 => 2.5
-            s.gsub!(%r{^(\d+):(\d+)$}) { $1.to_i + $2.to_i / 60.0 }
+            s.gsub!(%r{^(\d+):(\d+)$}) {$1.to_i + $2.to_i / 60.0}
             # 2h30, 2h, 30m => 2.5, 2, 0.5
-            s.gsub!(%r{^((\d+)\s*(h|hours?))?\s*((\d+)\s*(m|min)?)?$}i) { |m| ($1 || $4) ? ($2.to_i + $5.to_i / 60.0) : m[0] }
+            s.gsub!(%r{^((\d+)\s*(h|hours?))?\s*((\d+)\s*(m|min)?)?$}i) {|m| ($1 || $4) ? ($2.to_i + $5.to_i / 60.0) : m[0]}
           end
           # 2,5 => 2.5
           s.tr!(',', '.')