From aee85f9273fbf88ff881dd3605130c8a8fa823b0 Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Mon, 3 Nov 2014 14:27:45 +0000 Subject: [PATCH] Handle :rational type nodes via generic mutator --- lib/mutant/ast/types.rb | 5 ++++- lib/mutant/mutator/node/generic.rb | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/mutant/ast/types.rb b/lib/mutant/ast/types.rb index 46db3f1f..5e58c996 100644 --- a/lib/mutant/ast/types.rb +++ b/lib/mutant/ast/types.rb @@ -41,8 +41,11 @@ module Mutant # Nodes that are NOT generated by parser but used by mutant / unparser. EXTRA = symbolset.(%w[empty]) + # Nodes that are currently missing from parser META + MISSING = symbolset.(%w[rational]) + # All node types mutant handles - ALL = symbolset.((Parser::Meta::NODE_TYPES + EXTRA) - BLACKLIST) + ALL = symbolset.((Parser::Meta::NODE_TYPES + EXTRA + MISSING) - BLACKLIST) end # Types end # AST end # Mutant diff --git a/lib/mutant/mutator/node/generic.rb b/lib/mutant/mutator/node/generic.rb index 6b5e2389..8b815304 100644 --- a/lib/mutant/mutator/node/generic.rb +++ b/lib/mutant/mutator/node/generic.rb @@ -13,7 +13,7 @@ module Mutant :alias, :for, :xstr, :back_ref, :class, :sclass, :match_with_lvasgn, :while_post, :until_post, :preexe, :postexe, :iflipflop, :eflipflop, :kwsplat, - :shadowarg + :shadowarg, :rational ) private