It doesn't think it's a hash - it's a precedence issue. {}
binds tighter than do end
, so method :argument { other_method }
is parsed as method(:argument {other_method})
, which is not syntactically valid (but it would be if instead of a symbol the argument would be another method call).
If you add parentheses (method(:argument) { other_method }
), it will work fine.
And no, the code is not actually valid. If it were, it would work.