Honor Kernel#require #to_s arugments

This commit is contained in:
Markus Schirp 2014-06-15 15:50:38 +00:00
parent 27bb86ef51
commit bde4705f40

View file

@ -65,13 +65,14 @@ module Mutant
# Require file in zombie namespace
#
# @param [String] logical_name
# @param [#to_s] logical_name
#
# @return [self]
#
# @api private
#
def require(logical_name)
logical_name = logical_name.to_s
@highjack.original.call(logical_name)
return unless include?(logical_name)
@zombified << logical_name