lib/ronin/fuzzing/fuzzing.rb in ronin-support-0.5.0.rc1 vs lib/ronin/fuzzing/fuzzing.rb in ronin-support-0.5.0.rc2

- old
+ new

@@ -56,15 +56,20 @@ # The name of the fuzzer to return. # # @return [Enumerator] # An Enumerator for the fuzzer method. # + # @raise [NoMethodError] + # The fuzzing method could not be found. + # # @api semipublic # def self.[](name) - if (!Object.respond_to?(name) && respond_to?(name)) - enum_for(name) + if (!respond_to?(name) || Module.respond_to?(name)) + raise(NoMethodError,"no such fuzzing method: #{name}") end + + return enum_for(name) end module_function #