Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Passing block explicitly to superclass method fails #1237
At one point this worked (or maybe was not fully working) in Opal 0.9 but now it complains:
class SuperClass def add_stub(&block) puts 'super method, calling block' block.call end end class InheritingClass < SuperClass def add_stub(*args, &block) super(*args, &block) end end InheritingClass.new.add_stub do puts 'block ran' end
Runs OK in MRI. It does not happen with a standalone method nor does it happen when 1 method calls another in the same fashion, just when calling the superclass' method. This also causes arity checking to break.