You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not a bug, but more of an inconsistent interface, I expect it to return either a Node or raise an exception. And nil just doesn't give any information. I suggest raising exception in case of parser.error?
The text was updated successfully, but these errors were encountered:
I might consider it in the future on a major version, but that interface would be a breaking change. Right now it's expected that it could return nil if parsing failed, which matches ripper's behavior.
In the future this won't matter, because when we switch to the new parser it's going to always return something.
I've stumbled upon unexpected behaviour of
SyntaxTree#parse
Actual behaviour:
Expected behaviour:
It's not a bug, but more of an inconsistent interface, I expect it to return either a
Node
or raise an exception. Andnil
just doesn't give any information. I suggest raising exception in case ofparser.error?
The text was updated successfully, but these errors were encountered: