From: Jonathan Lim Date: 2002-01-13T23:17:11+09:00 Subject: Conflicting method names with modules Hi, I'm working my way through the Pickaxe book and am on Chapter 9 Modules. I am a little confused as to how methods work if you mixin several modules containing identical method names. If you see the code below: how can I specify which method (testmethod) should be being called in the ScaleDemo initialize method? It appears that it takes the last module included as the method, but is there a way I can qualify it to take the other one? Thanks, Jon PS Loving the language so far. :) -- module MajorScales attr :numNotes def majorNum @numNotes = 7 if @numNotes.nil? @numNotes # Return 7 end def testmethod puts "MajorScales test method" end end module PentatonicScales attr :numNotes def pentaNum @numNotes = 5 if @numNotes.nil? @numNotes # Return 5? end def testmethod puts "Pent test method" end end class ScaleDemo include MajorScales include PentatonicScales def initialize puts majorNum # Should be 7 puts pentaNum # Should be 5 testmethod end end ScaleDemo.new