Guest User

Untitled

a guest
Jun 21st, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. module A
  2. def a_method
  3. puts 'bar'
  4. end
  5. end
  6.  
  7. module B
  8. def a_method
  9. puts 'foo'
  10. super
  11. end
  12. end
  13.  
  14. class Something
  15. end
  16.  
  17. A.send(:include, B)
  18. Something.send(:include, A)
  19.  
  20. Something.new.a_method # => foo bar
Add Comment
Please, Sign In to add comment