From 4c857552290df8286c77f2f5c3136540e0b6f55d Mon Sep 17 00:00:00 2001 From: Ilya Bylich Date: Thu, 28 Dec 2023 17:37:52 +0100 Subject: [PATCH] document running no "syntax checks for block exits" (added first in MRI 3.3.0) (#975) This commit tracks upstream commit ruby/ruby@e1250a5. --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index e8d7eea84..152012ea0 100644 --- a/README.md +++ b/README.md @@ -260,6 +260,15 @@ issue](https://github.com/whitequark/parser/issues/72). It is unknown whether any gems are affected by this issue. +### Syntax check of block exits + +Similar to "void value expression" checks Ruby MRI also checks for correct +usage of `break`, `next` and `redo`, if it's used outside of a {break,next,redo}-able +context Ruby returns a syntax error starting from 3.3.0. `parser` gem simply doesn't +run this type of checks. + +It is unknown whether any gems are affected by this issue. + ### Invalid characters inside comments and literals Ruby MRI permits arbitrary non-7-bit byte sequences to appear in comments, as well as in string or symbol literals in form of escape sequences, regardless of source encoding. Parser requires all source code, including the expanded escape sequences, to consist of valid byte sequences in the source encoding that are convertible to UTF-8.