summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-11 17:37:13 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-04-11 17:37:13 +0000
commitde0689d4f47ad06867b98c0253c80edb1f49e211 (patch)
tree929ce7580d331b6b0b5aedf036381efc7b7dc792 /lib
parent1511b1435acce37bf013cf49f6fe2bb1abcadccb (diff)
downloadredmine-de0689d4f47ad06867b98c0253c80edb1f49e211.tar.gz
redmine-de0689d4f47ad06867b98c0253c80edb1f49e211.zip
Makes time syntax case insensitive (#10635).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9387 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/core_ext/string/conversions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/core_ext/string/conversions.rb b/lib/redmine/core_ext/string/conversions.rb
index 6d9d50731..3001904e1 100644
--- a/lib/redmine/core_ext/string/conversions.rb
+++ b/lib/redmine/core_ext/string/conversions.rb
@@ -30,7 +30,7 @@ module Redmine #:nodoc:
# 2:30 => 2.5
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)?)?$}) { |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.gsub!(',', '.')