title: String Encoding in Ruby
body: <p>I recently started working with encoding in Ruby, and am confused by some behavior.</p>
  
  <p>I'm using 2.2.3p173 and am showing the following:</p>
  
  <pre><code>__ENCODING__             #=&gt; #&lt;Encoding:UTF-8&gt;  Default encoding in 2.2.3
  
  "my_string".encoding     #=&gt; #&lt;Encoding:UTF-8&gt;
  Object.to_s.encoding     #=&gt; #&lt;Encoding:US-ASCII&gt;
  Object.new.to_s.encoding #=&gt; #&lt;Encoding:ASCII-8BIT&gt;
  </code></pre>
  
  <p>What's the cause of this discrepancy in encodings?</p>