You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 31d1e84
Browse filesBrowse the repository at this point in the historyBrowse files
Fix infinite loop and stack overflow on cyclic superclass chains (#1785)
Related to #1781 and #1782
Fix crash when a class has a superclass cycle.
Superclass chain can have a cycle. Some cycle can be rejected in parse
phase(#1784), but I think some manually crafted case aren't possible to
reject in parse phase. So `ancestors` `superclasses` must handle cyclic
chain for now.
Even after #1784, superclass cycle can be created by:
```ruby
class A < B; end
class B < C; end
class C < B; end
```
(Perhaps there's an option to add validation phase that detects and
fixes cyclic chain in the future)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
0 commit comments