highlight.js icon indicating copy to clipboard operation
highlight.js copied to clipboard

fix(ruby): stricter block params, allowing bitwise OR

Open dysonreturns opened this issue 1 year ago • 1 comments

Block parenthesis, which are two pipe symbols are applicable after a do |param| or inside of an inline block { |param| ... }.

Resolves #4187

Changes

This change ensures the pipes |param| are preceded by an open bracket { or a do. By being specific when these parenthesis occur, bitwise OR operations | don't read what follows as params indefinitely.

Checklist

  • [x] Added markup tests, or they don't apply here because...
  • [x] Updated the changelog at CHANGES.md

dysonreturns avatar Dec 18 '24 23:12 dysonreturns

Thanks! I've just noticed this bug too

jimtng avatar Oct 03 '25 02:10 jimtng