Remove deep_clone helper

Deep cloning ast nodes is not needed anymore. Parser ast is immutable by
default and mutations do not need to mutate deep_cloned copies anymore.
This commit is contained in:
Markus Schirp 2013-07-02 19:11:39 +02:00
parent fb20b7b016
commit d4b94fc8f4
3 changed files with 1 additions and 25 deletions

View file

@ -27,7 +27,6 @@ require 'mutant/node_helpers'
require 'mutant/singleton_methods'
require 'mutant/constants'
require 'mutant/support/method_object'
require 'mutant/helper'
require 'mutant/random'
require 'mutant/mutator'
require 'mutant/mutation'

View file

@ -1,23 +0,0 @@
module Mutant
# Module for support methods
#
# They would normally be defined on the root namespace.
# But it is easier to create the Zombie when there are no
# References to the root namespace name within the library.
#
module Helper
# Return deep clone of object
#
# @param [Object] object
#
# @return [Object] object
#
# @api private
#
def self.deep_clone(object)
Marshal.load(Marshal.dump(object))
end
end # Helper
end # Mutant

View file

@ -192,7 +192,7 @@ module Mutant
# @api private
#
def dup_input
Helper.deep_clone(input)
input.dup
end
end # Mutator