From a3b9419494688581db9d2870628de4d1226fe64a Mon Sep 17 00:00:00 2001 From: Markus Schirp Date: Sun, 29 Jul 2012 18:03:44 +0200 Subject: [PATCH] Do not pass method name to to_enum calls within #each --- lib/mutant/mutatee.rb | 2 +- lib/mutant/mutator.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mutant/mutatee.rb b/lib/mutant/mutatee.rb index c7065411..b23a2ba1 100644 --- a/lib/mutant/mutatee.rb +++ b/lib/mutant/mutatee.rb @@ -30,7 +30,7 @@ module Mutant # @api private # def each(&block) - return to_enum(__method__) unless block_given? + return to_enum unless block_given? Mutator.build(node).each(&block) self diff --git a/lib/mutant/mutator.rb b/lib/mutant/mutator.rb index 108de355..cec3b99c 100644 --- a/lib/mutant/mutator.rb +++ b/lib/mutant/mutator.rb @@ -48,7 +48,7 @@ module Mutant # @api private # def each(&block) - return to_enum(__method__) unless block_given? + return to_enum unless block_given? mutants(Generator.new(block)) self end