diff --git a/lib/haml/util.rb b/lib/haml/util.rb index 02495165..6fb55471 100755 --- a/lib/haml/util.rb +++ b/lib/haml/util.rb @@ -106,18 +106,6 @@ module Haml end end - # Destructively strips whitespace from the beginning and end - # of the first and last elements, respectively, - # in the array (if those elements are strings). - # - # @param arr [Array] - # @return [Array] `arr` - def strip_string_array(arr) - arr.first.lstrip! if arr.first.is_a?(String) - arr.last.rstrip! if arr.last.is_a?(String) - arr - end - # Return an array of all possible paths through the given arrays. # # @param arrs [Array] diff --git a/test/util_test.rb b/test/util_test.rb index 61081603..2763c12c 100644 --- a/test/util_test.rb +++ b/test/util_test.rb @@ -65,15 +65,6 @@ class UtilTest < MiniTest::Unit::TestCase powerset([1, 2, 3])) end - def test_strip_string_array - assert_equal(["foo ", " bar ", " baz"], - strip_string_array([" foo ", " bar ", " baz "])) - assert_equal([:foo, " bar ", " baz"], - strip_string_array([:foo, " bar ", " baz "])) - assert_equal(["foo ", " bar ", :baz], - strip_string_array([" foo ", " bar ", :baz])) - end - def test_paths assert_equal([[1, 3, 5], [2, 3, 5], [1, 4, 5], [2, 4, 5]], paths([[1, 2], [3, 4], [5]]))