3 ms·
If you emulate the way the MRI parses it, sure. For example: # Is this some_method with an empty block, or an empty hash? some_method {} # Is this a re
by damncabbage 13y ago
If you emulate the way the MRI parses it, sure.
For example:
# Is this some_method with an empty block, or an empty hash?
some_method {}
# Is this a regex or a comment?
#
# It depends how many arguments "whatever" takes, and you
# don't know that until you run the code that defines it.
#
# Interpretation is implementation-defined. It just so
# happens that the MRI determines that the below ISN'T a
# regex because it has a SPACE character just after the "/".
whatever / 25 ; # / ; raise SystemExit.new;