title: Why I couldn't require 'string.rb' file in ruby
body: <p>I am implementing gem, I want to add some custom methods to String class. So, I created in 'lib' directory sub-directory 'core_ext', and placed there file 'string.rb'.</p>
  
  <p>string.rb contains:</p>
  
  <pre><code>class String
    def custom_method
      some_action
    end
  end
  </code></pre>
  
  <p>In my main file I made:</p>
  
  <pre><code>require 'core_ext/string.rb'
  </code></pre>
  
  <p>but it doesn't have any influence on String class, </p>
  
  <p>If I change file's name to some other name, like 'my_string.rb' and change line with require, everything will work properly. Why I can't use 'string.rb' as name of file?</p>