topazproject / topaz

A high performance ruby, written in RPython
topazruby.com
BSD 3-Clause "New" or "Revised" License
1k stars 84 forks source link

Fixed a bug in lexical const lookup #871

Closed alex closed 7 years ago

alex commented 7 years ago

I actually have no idea what the bug is, but the handling of object_seen looks "obviously wrong" to me. It will never be the case that we hit fallback_scope = None because that currently requires w_mod is self.w_basicobject and object_seen. object_seen = w_mod is self.w_object. By substitution that means w_mod is self.w_basicobject and w_mod is self.w_object which is trivially false.

The fix I propose here makes intuitive sense to me, but I haven't event attempted to run this code.