Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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;


Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: