😎

[Bug #21027] not() の結果が parse.y と prism で異なるバグ報告

2025/01/13に公開

[Bug #21027] not() receiver should be nil

  • not() の結果が parse.yprism で異なるというバグ報告
p not()
# parse.y => true
# prism   => false
  • not() って有効なシンタックスになるんですね、へえ
  • これは not()parse.ynil.! と解釈されるのに対して prismself.! と解釈されるから、らしい
  • この不具合は開発版の Ruby 3.5-dev で修正済みで prism の場合でも true が返るようになります
GitHubで編集を提案

Discussion