Files
mruby-mruby/test/t
Yukihiro "Matz" Matsumoto f5ca906852 mruby-compiler: fix bare nil? in if/unless to use self as receiver
The if/unless nil? optimization called codegen() on the call node's
receiver, but a bare `nil?` is parsed as an FCALL whose receiver is
NULL. codegen(NULL) emits OP_LOADNIL, so the JMPNIL was testing the
literal nil instead of self, making `if nil?` always behave as
`if nil.nil?` (always true) and `unless nil?` always skip its body.
Load self when the receiver is implicit. Fixes #6874.

Co-authored-by: Claude <noreply@anthropic.com>
2026-05-30 07:39:45 +09:00
..
2021-11-26 12:18:41 +09:00
2021-03-01 10:06:17 +10:00
2026-05-07 15:51:30 +00:00
2025-01-26 21:11:21 +09:00
2021-03-01 10:06:17 +10:00
2021-03-01 10:06:17 +10:00
2021-05-03 15:30:59 +09:00
2021-06-16 08:34:54 +10:00