From 8dca980a35dd39ea322a55c510d8b2c3f191c459 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 3 Jun 2017 08:44:29 +0000 Subject: [PATCH] Make sure we can call #values. git-svn-id: http://svn.redmine.org/redmine/trunk@16604 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/sort_criteria.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}.") -- 2.39.5