4 ms·
if foo.something foo.instance_eval "SYNTAX ERROR" end I know any form of eval is sort of cheating... But perhaps what he meant was not a syntax erro
by TheDong 11y ago
if foo.something
foo.instance_eval "SYNTAX ERROR"
end
I know any form of eval is sort of cheating...
But perhaps what he meant was not a syntax error, but things like:
if foo.something
foo.something_misspelled = bar
end
Which isn't technically a syntax error, but that code is invalid in a statically typed language.