Guest User

Untitled

a guest
Jul 23rd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. module MyModule
  2. def some_method; super; end
  3. end
  4.  
  5. class MyBaseClass; end
  6.  
  7. class MySubClass < MyBaseClass;
  8. include MyModule
  9. end
  10.  
  11. # To trigger this bug, we must include the module in the base class after
  12. # the module has already been included in the subclass. If we move this line
  13. # above the subclass declaration, this bug will not occur.
  14. MyBaseClass.send(:include, MyModule)
  15.  
  16. MySubClass.new.some_method
Add Comment
Please, Sign In to add comment