lib/abstraction.rb in Peeja-abstraction-0.0.1 vs lib/abstraction.rb in Peeja-abstraction-0.0.2
- old
+ new
@@ -19,14 +19,14 @@
class Class
def abstract
abstract_class = self
- raise_if_abstract = lambda do
+ raise_if_abstract = lambda do |*args, &block|
if self == abstract_class
raise AbstractClassError, "#{self} is an abstract class and cannot be instantiated"
else
- super
+ super *args, &block
end
end
meta_def :new, &raise_if_abstract
meta_def :allocate, &raise_if_abstract