Hi all,
I was just thinking about the potential issue of including multiple modules with identical method names. Specifically, I was wondering about the -w switch.
Consider:
class Foo
attr_reader :test
def test; end
end
Running this with -w emits, "warning: method redefined; discarding old test".
Now consider:
module Bar
def test; end
end
module Baz
def test; end
end
class Foo
include Bar
include Baz
end
Shouldn't -w emit a warning in this case? If not, why not? If so, how difficult would it be to implement? And would it have any annoying -w side effects?
Regards,
Dan