title: How to convert Array of Constants into String with the constant names and not its assigned values
body: <p>For example:</p>
  
  <pre><code>ABC = 'abc'
  DEF = 'def'
  XYZ = 'anything'
  LIST_ALL = [ABC, DEF, XYZ]
  </code></pre>
  
  <p>If I do </p>
  
  <pre><code>LIST_ALL.reject(&amp;:blank?).join(', ') # =&gt; "abc, def, anything"
  </code></pre>
  
  <p>What I am looking for is to get the constant names, not their values
  Expected output:</p>
  
  <pre><code>LIST_ALL.something() #=&gt; "ABC, DEF, XYZ"
  </code></pre>
  
  <p>Approach #1:</p>
  
  <pre><code>class X
    ABC = "abc"
    DEF = "def"
    GHI = ""
    XYZ = "anything"
    LIST_ALL = %w(ABC DEF GHI XYZ)
  
    def self.something()
       puts LIST_ALL.reject{|c| c.constantize.blank?}.join(', ')
       # puts LIST_ALL[0].constantize
    end
  end
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>(NameError)  uninitialized constant ABC;
  </code></pre>