Skip to content

Commit 7ae055c

Browse files
committed
Use each_with_object instead of each.with_object
1 parent 95d4afb commit 7ae055c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/sass/compiler/host/protofier.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def to_proto(obj)
3939
argument_list: EmbeddedProtocol::Value::ArgumentList.new(
4040
id: obj.instance_eval { @id },
4141
contents: obj.to_a.map { |element| to_proto(element) },
42-
keywords: obj.keywords.each.with_object({}) { |(key, value), hash| hash[key.to_s] = to_proto(value) },
42+
keywords: obj.keywords.each_with_object({}) { |(key, value), hash| hash[key.to_s] = to_proto(value) },
4343
separator: ListSeparator.to_proto(obj.separator)
4444
)
4545
)

lib/sass/serializer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module Serializer
77

88
CSS_ESCAPE = [*"\x01".."\x08", *"\x0A".."\x1F", "\x7F"]
99
.product([*'0'..'9', *'a'..'f', *'A'..'F', "\t", ' ', nil])
10-
.each.with_object({ "\0" => "\uFFFD", '\\' => '\\\\', '"' => '\\"', "'" => "\\'" }) do |(c, x), h|
10+
.each_with_object({ "\0" => "\uFFFD", '\\' => '\\\\', '"' => '\\"', "'" => "\\'" }) do |(c, x), h|
1111
h["#{c}#{x}".freeze] = "\\#{c.ord.to_s(16)}#{" #{x}" if x}".freeze
1212
end.freeze
1313

lib/sass/value/number/unit.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ module Unit
141141
'pixel density': %w[dpi dpcm dppx]
142142
}.freeze
143143

144-
TYPES_BY_UNIT = UNITS_BY_TYPE.each.with_object({}) do |(key, values), hash|
144+
TYPES_BY_UNIT = UNITS_BY_TYPE.each_with_object({}) do |(key, values), hash|
145145
values.each do |value|
146146
hash[value] = key
147147
end

0 commit comments

Comments
 (0)