title: Why does Eclipse complain about "Feature envy" smell in my code?
body: <p>Eclipse (RedRails) complain about "<a href="http://reek.rubyforge.org/rdoc/classes/Reek/Smells/FeatureEnvy.html" rel="nofollow noreferrer">Feature envy</a>" in the following code:</p>
  
  <pre><code>if input_text =~ /^(---\s*\n.*?\n?)(---.*?)/m
    content_text = input_text[($1.size + $2.size)..-1] # warning in $1
  
    header = YAML.load($1)
  
    @content = content_text.strip()
    @title = header["title"]
  end
  </code></pre>
  
  <p>My understanding is that I safe to ignore this warning. But I am wandering why this warning is generated. I cannot understand how I can extract method for <code>$1.size</code> and <code>$1</code>.</p>