lib/usable.rb in usable-2.1.1 vs lib/usable.rb in usable-2.1.2

- old
+ new

@@ -66,11 +66,11 @@ end end [scope, usables].each { |x| options.each { |k, v| x[k] = v } } [scope, usables].each { |x| x.instance_eval &block } if block_given? ModExtender.new(mod, usable_options).call self - send :include, mod.const_get(:InstanceMethods) if const_defined? :InstanceMethods - send :extend, mod.const_get(:ClassMethods) if const_defined? :ClassMethods + send :include, mod.const_get(:InstanceMethods) if mod.const_defined?(:InstanceMethods) + send :extend, mod.const_get(:ClassMethods) if mod.const_defined?(:ClassMethods) self end # @return [Method] bound to the given -context- def usable_method(context, method_name)