Skip to content

Commit 92203a1

Browse files
committed
Fix hash code for compiler functions and mixins
1 parent 0378284 commit 92203a1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/sass/compiler/host/function_registry.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class FunctionRegistry
1212
def initialize(functions, alert_color:)
1313
functions = functions.transform_keys(&:to_s)
1414

15-
@environment = BasicObject.new
15+
@environment = Object.new
1616
@global_functions = functions.keys
1717
@functions_by_name = functions.transform_keys do |signature|
1818
index = signature.index('(')

lib/sass/value/function.rb

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

3939
# @return [Integer]
4040
def hash
41-
@hash ||= id.nil? ? signature.hash : id.hash
41+
@hash ||= id.nil? ? signature.hash : [environment, id].hash
4242
end
4343

4444
# @return [Function]

lib/sass/value/mixin.rb

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

2626
# @return [Integer]
2727
def hash
28-
@hash ||= id.hash
28+
@hash ||= [environment, id].hash
2929
end
3030

3131
# @return [Mixin]

0 commit comments

Comments
 (0)