summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-06-03 08:44:29 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-06-03 08:44:29 +0000
commit8dca980a35dd39ea322a55c510d8b2c3f191c459 (patch)
treee9d743d77ecaf3634edf4798a5891814b4669a7f /lib
parent6ca3e4f75fa1efafccf928e06f1bd8fd2045c93c (diff)
Make sure we can call #values.
git-svn-id: http://svn.redmine.org/redmine/trunk@16604 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/redmine/sort_criteria.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/sort_criteria.rb b/lib/redmine/sort_criteria.rb
index 5fd2e978d..3d440f010 100644
--- a/lib/redmine/sort_criteria.rb
+++ b/lib/redmine/sort_criteria.rb
@@ -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}.")