I was writing some code in an erb template that looked like this:
<% if @user && not @user.errors.empty? -%>
#do stuff
<% end -%>
This resulted in a syntax error. Huh? What’s wrong with this?
Turns out it’s an outstanding Core Ruby bug.
As shown in the ticket if we have a method foo
def foo(parameter)
puts parameter.to_s
end
using the ! [...]
My name is Theodore Nguyen-Cao. I'm a software engineer and I blog my thoughts on technology and life.