mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Remove strip_string_array - dead code
This commit is contained in:
parent
45ffb09b09
commit
d7985dd9fd
2 changed files with 0 additions and 21 deletions
|
@ -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<Array>]
|
||||
|
|
|
@ -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]]))
|
||||
|
|
Loading…
Add table
Reference in a new issue