Skip to content

Instantly share code, notes, and snippets.

@tomafro
Created September 21, 2010 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomafro/590064 to your computer and use it in GitHub Desktop.
Save tomafro/590064 to your computer and use it in GitHub Desktop.
module A
def example
puts "A"
super rescue nil
end
end
module B
def example
puts "B"
super rescue nil
end
end
module C
def example
puts "C"
super rescue nil
end
end
class SingleLine
include A, B, C
end
puts "SingleLine: "
SingleLine.new.example
class ManyLines
include A
include B
include C
end
puts
puts "ManyLines: "
ManyLines.new.example
SingleLine:
A
B
C
ManyLines:
C
B
A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment