title: How to remove a string from an array with Ruby 2.5.3?
body: <p>I develop on Ruby on Rails 5.2.
  With the purpose of managing translations, I wish to allow the user to select a language which is different from his current language. The list of configured languages of the application is</p>
  
  <pre><code> all_languages = I18n.config.available_locales
  </code></pre>
  
  <p>all_languages is an Array. <code>puts all_languages</code> returns:</p>
  
  <pre><code>en fr de it
  </code></pre>
  
  <p>The user language is defined in the users table. A method returns current user's language</p>
  
  <pre><code>user_language = current_user.language
  </code></pre>
  
  <p>user_language is a String. <code>puts user_language</code> returns:</p>
  
  <pre><code>en
  </code></pre>
  
  <p>I try to apply the delete(obj) method to the array, but this does not alter the array:</p>
  
  <pre><code>all_languages.delete(user_language)
  </code></pre>
  
  <p>I try to work on arrays only, still it does not alter the languages array:</p>
  
  <pre><code>remove_language = Array.new
  remove_language &lt;&lt; user_language
  </code></pre>
  
  <p><code>puts remove_language</code> returns:</p>
  
  <pre><code>en
  </code></pre>
  
  <p><code>puts all_languages - remove_language</code> returns:</p>
  
  <pre><code>en fr de it
  </code></pre>
  
  <p>where the <strong>en</strong> language should be removed. I don't understand why it remains in the list!</p>