Make sure we can call #values.

git-svn-id: http://svn.redmine.org/redmine/trunk@16604 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2017-06-03 08:44:29 +00:00
parent 6ca3e4f75f
commit 8dca980a35

View File

@@ -23,7 +23,7 @@ module Redmine
replace arg
elsif arg.is_a?(String)
replace arg.split(',').collect {|s| s.split(':')[0..1]}
elsif arg.is_a?(Hash)
elsif arg.respond_to?(:values)
replace arg.values
elsif arg
raise ArgumentError.new("SortCriteria#new takes an Array, String or Hash, not a #{arg.class.name}.")