title: How to check if a word is a palindrome without using "string.reverse" method in Ruby?
body: <p>I'm trying to use Ruby to check if a word is a palindrome, but I'm not allowed to use built-in functions like <code>str.reverse</code>. How should I tackle this problem?</p>
  
  <p>Below is the code with the <code>.reverse</code> method, it works, but I'm not sure how to check if a word is a palindrome without the <code>.reverse</code>.</p>
  
  <pre class="lang-rb prettyprint-override"><code>def palindrome(word)
    i = 0
    if word.reverse == word
      puts "#{word} is a palindrome!"
    else
      puts "#{word} is not a palindrome"
    end
  end
  
  puts palindrome("peep")
  </code></pre>
  
  <p>It should print something like "racecar is a palindrome!".</p>