method
safe_sort
1.3.0 -
Show latest stable
-
0 notes -
Class: Spec::Matchers::MatchArray
- 1.1.4
- 1.1.12
- 1.2.0
- 1.2.8 (0)
- 1.3.0 (0)
- 1.3.1 (0)
- What's this?
safe_sort(array)
private
Hide source
# File lib/spec/matchers/match_array.rb, line 36 def safe_sort(array) array.all?{|item| item.respond_to?(:<=>)} ? array.sort : array end