Please sign in to comment.
let this regexp be stricter
The purpose of this regexp is to detect strings that are valid identifiers to be used as method names. The anchor $ allows a trailing newline, and both ^ and $ may be bypassed because Ruby regexps are multiline always. The anchors \A and \z are the proper ones to ensure string boundaries.
- Loading branch information...
Showing with 1 addition and 1 deletion.