Prefer String#chomp over String#sub
This commit is contained in:
parent
d107821b4c
commit
4d08889a7c
1 changed files with 1 additions and 1 deletions
|
@ -6,7 +6,7 @@ module Mutant
|
|||
Types::ALL.each do |type|
|
||||
fail "method: #{type} is already defined" if instance_methods(true).include?(type)
|
||||
|
||||
name = "n_#{type.to_s.sub(/\??\z/, '?')}"
|
||||
name = "n_#{type.to_s.chomp('?')}?"
|
||||
|
||||
define_method(name) do |node|
|
||||
node.type.equal?(type)
|
||||
|
|
Loading…
Reference in a new issue