Skip to content

Commit

Permalink
Corrected error message as suggested by @parkr.
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Jorn Rogalla <martin@martinrogalla.com>
  • Loading branch information
MartinRogalla committed Mar 1, 2015
1 parent 78af3c5 commit 92a9582
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/jekyll/filters.rb
Expand Up @@ -223,7 +223,7 @@ def where(input, property, value)
# Returns the filtered array of objects
def sort(input, property = nil, nils = "first")
if input.nil?
raise ArgumentError.new("Sort: cannot sort a null object.")
raise ArgumentError.new("Cannot sort a null object.")
end
if property.nil?
input.sort
Expand Down
2 changes: 1 addition & 1 deletion test/test_filters.rb
Expand Up @@ -284,7 +284,7 @@ def to_liquid
err = assert_raises ArgumentError do
@filter.sort(nil)
end
assert_equal "Sort: cannot sort a null object.", err.message
assert_equal "Cannot sort a null object.", err.message
end
should "return sorted numbers" do
assert_equal [1, 2, 2.2, 3], @filter.sort([3, 2.2, 2, 1])
Expand Down

0 comments on commit 92a9582

Please sign in to comment.