title: Ruby String Object Empty or Not?
body: <p>I have a string that is the output of Ruby on Rails <code>render_to_string</code></p>
  
  <p>When in the Ruby debugger this is what I get</p>
  
  <pre><code>pp string.inspect # -&gt;  blank
  pp string         # -&gt;  blank
  pp string.Class   # -&gt;  String
  pp string.empty?  # -&gt;  false
  pp string.nil?    # -&gt;  false
  pp string.blank?  # -&gt;  false
  pp string.to_s    # -&gt;  blank
  </code></pre>
  
  <p>I know there is content in the string because <code>logger.info string</code> returns the string as expected, but I don't know how to get to it.</p>
  
  <p>Any ideas? Thanks!</p>
  
  <p>EDIT: I figured out that this problem is very localized. It only happens when I am using the ruby-debugger. And it happens to any string that has a percent symbol in it.</p>
  
  <p>For example, If I made a string</p>
  
  <pre><code>string = 'this is a string with a % symbol'
  </code></pre>
  
  <p>the string can no longer be inspected, printed, or even unpack. </p>
  
  <p>I am on Ruby 1.8 and Rails 2.3.</p>
  
  <p>I think this may be just part of my lack of understanding about something mundane in Ruby.</p>