Skip to content

Commit 5be339d

Browse files
committed
Rename hash code helper method
1 parent 2f4ba1c commit 5be339d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/sass/value/color.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -340,10 +340,10 @@ def ==(other)
340340
def hash
341341
@hash ||= [
342342
_space.name,
343-
FuzzyMath._round(channel0_or_nil),
344-
FuzzyMath._round(channel1_or_nil),
345-
FuzzyMath._round(channel2_or_nil),
346-
FuzzyMath._round(alpha_or_nil)
343+
FuzzyMath._hash(channel0_or_nil),
344+
FuzzyMath._hash(channel1_or_nil),
345+
FuzzyMath._hash(channel2_or_nil),
346+
FuzzyMath._hash(alpha_or_nil)
347347
].hash
348348
end
349349

lib/sass/value/fuzzy_math.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def _clamp_like_css(number, lower_bound, upper_bound)
7474
number.to_f.nan? ? lower_bound : number.clamp(lower_bound, upper_bound)
7575
end
7676

77-
def _round(number)
77+
def _hash(number)
7878
number&.finite? ? (number * INVERSE_EPSILON).round : number
7979
end
8080
end

lib/sass/value/number.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def ==(other)
9999

100100
# @return [Integer]
101101
def hash
102-
@hash ||= FuzzyMath._round(canonical_units_value).hash
102+
@hash ||= FuzzyMath._hash(canonical_units_value).hash
103103
end
104104

105105
# @return [::Boolean]

0 commit comments

Comments
 (0)