`new` only raises `NotImplementedError` when the abstract class' superclass is `Object` #9

misfo opened this Issue Oct 4, 2013 · 1 comment


None yet
1 participant

misfo commented Oct 4, 2013

For classes that have a different superclass, the user is allowed to instantiate the class.

For example this include has no effect on the class. So...:

require 'anima'

# this is allowed even though Anima::Error included AbstractType
Anima::Error.new(Object, :some_attribute)

@misfo misfo added a commit to misfo/abstract_type that referenced this issue Oct 4, 2013

@misfo misfo Prevent instantiation of abstract classes whose superclass isn't Object
Fixes #9

misfo commented Oct 4, 2013

@mbj I know this bug has a trivial effect on Anima, but I figured I'd ping you here anyways in case you have an opinion on the fix

dkubb closed this in #10 Oct 5, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment