Ruby: syntax error, unexpected end-of-input, expecting keyword_end : <p>I am working on some simple ruby exercises and cannot figure out why I am getting the "syntax error, unexpected end-of-input, expecting keyword_end". I keep running over my code and don't see what is wrong, although I am new to ruby.</p>

<pre><code>def SimpleSymbols(str)

    spec_char = "+="
    alpha = "abcdefghijklmnopqrstuvwxyz"

    str.each_char do |i|
        if spec_char.include? i
            next
        else alpha.include? i 
            if spec_char.include? str[str.index(i) + 1] &amp;&amp; if spec_char.include? str[str.index(i) - 1]
                next
            else
                return false
            end
        end
    end

    return true
end

SimpleSymbols(STDIN.gets.chomp)
</code></pre>
