title: What is Enumerator object? (Created with String#gsub)
body: <p>I have an attributes array as follows,</p>
  
  <pre><code>attributes = ["test, 2011", "photo", "198.1 x 198.1 cm", "Photo: Manu PK Full Screen"]
  </code></pre>
  
  <p>When i do this, </p>
  
  <pre><code>artist = attributes[-1].gsub("Photo:")
  p artist
  </code></pre>
  
  <p>i get the following output in terminal</p>
  
  <pre><code>#&lt;Enumerator: "Photo: Manu PK Full Screen":gsub("Photo:")&gt;
  </code></pre>
  
  <p>Wondering why am I getting an enumerator object as output? Thanks in advance.</p>
  
  <p>EDIT:
  Please note that instead of <code>attributes[-1].gsub("Photo:", ""), I am doing attributes[-1].gsub("Photo:")</code> So would like to know why enumerator object has returned here( I was expecting an error message) and what is going on.?</p>
  
  <p>Ruby  - 1.9.2</p>
  
  <p>Rails - 3.0.7</p>