title: Ruby Namespace conflict with module class instance variable defined in a method and using attr:
body: <p>I am trying to familiarize myself with modules and this code shows a name clash in main that I can not find any information on how to resolve using a namepace (only) with a module class instance variable.  Perhaps not possible?</p>
  
  <p>**Modified code slightly so  "c = "MAIN"" is before "include" so no doubt that two c variables exist.  Added class so I can specify 'cv::a' which I believe is an example of an explicit receiver as you mentioned. I deliberately created the name collision just to see if I could resolve it (main::c was defined before include in my original code from which this was snipped)</p>
  
  <p>I guess my theoretical question becomes can I in some manner specify an explicit receiver (like M2.C) for the instance variable 'c' defined in a method, the similar to that of 'a' (cv::a) defined in a class.</p>
  
  <p>I had decided probably not possible as I was unable to code a namespace to prefix 'c' but thought to ask thinking I had missed something.
  If this is possible using my code, could you show me how to do so.*</p>
  
  <pre><code>module M2
  def method_vars() @c = "@C"; @d = "@D";  end  
  attr :c; attr :d
  
  class Class_var
    def   init()  @a = "A"; @b = "B"; end
    attr :a; attr :b
  end
  end
  c = "MAIN" 
  include M2  
  method_vars()
  puts "&gt;#{c}&lt;---&gt;#{d}&lt;"  # &gt;MAIN&lt;---&gt;@D&lt;
  cv = Class_var.new
  cv.init()
  puts "&gt;#{cv::a}&lt;---&gt;#{cv::b}&lt;" # &gt;A&lt;---&gt;B&lt;  
  exit
  </code></pre>