diff --git a/lib/jekyll/filters.rb b/lib/jekyll/filters.rb index 73e66229..06a4147f 100644 --- a/lib/jekyll/filters.rb +++ b/lib/jekyll/filters.rb @@ -273,7 +273,7 @@ module Jekyll begin input.to_i rescue - raise ArgumentError, "Invalid input object type." + raise ArgumentError, "Object '#{input.inspect}' could not be converted into an integer." end end diff --git a/test/test_filters.rb b/test/test_filters.rb index 06fa59ff..c8d4a68b 100644 --- a/test/test_filters.rb +++ b/test/test_filters.rb @@ -645,7 +645,7 @@ class TestFilters < JekyllUnitTest context "to_integer filter" do should "raise Exception when input is not integer or string" do - err_msg = "Invalid input object type." + err_msg = "Object '[1, 2]' could not be converted into an integer." err = assert_raises ArgumentError do @filter.to_integer([1, 2]) end