Deduplicate .to_set.freeze chains

This commit is contained in:
Markus Schirp 2014-07-06 03:09:08 +00:00
parent 22e0bdbfc1
commit ea14f772f4

View file

@ -24,13 +24,13 @@ module Mutant
>> ** * % / | ^ & < > + - ~@ +@ -@ ! >> ** * % / | ^ & < > + - ~@ +@ -@ !
]) ])
BINARY_METHOD_OPERATORS = ( BINARY_METHOD_OPERATORS = symbolset.(
METHOD_OPERATORS - (INDEX_OPERATORS + UNARY_METHOD_OPERATORS) METHOD_OPERATORS - (INDEX_OPERATORS + UNARY_METHOD_OPERATORS)
).to_set.freeze )
OPERATOR_METHODS = ( OPERATOR_METHODS = symbolset.(
METHOD_OPERATORS + INDEX_OPERATORS + UNARY_METHOD_OPERATORS METHOD_OPERATORS + INDEX_OPERATORS + UNARY_METHOD_OPERATORS
).to_set.freeze )
# Nodes that are NOT handled by mutant. # Nodes that are NOT handled by mutant.
# #
@ -42,7 +42,7 @@ module Mutant
EXTRA = symbolset.(%w[empty]) EXTRA = symbolset.(%w[empty])
# All node types mutant handles # All node types mutant handles
ALL = ((Parser::Meta::NODE_TYPES + EXTRA) - BLACKLIST).to_set.freeze ALL = symbolset.((Parser::Meta::NODE_TYPES + EXTRA) - BLACKLIST)
end # Types end # Types
end # AST end # AST
end # Mutant end # Mutant