A < X def x = :a end class B < X def x = :b end class C < X def x = :c end :a if self.class == A Ruby Code Ruby 3.2 YJIT :b if self.class == B :c if self.class == C
A < X def x = :a end class B < X def x = :b end class C < X def x = :c end class D < X def x = :d end :a if self.class == A Ruby Code Ruby 3.2 YJIT :b if self.class == B :c if self.class == C side exit
A < X def x = :a end class B < X def x = :b end class C < X def x = :c end class D < X def x = :d end :a if self.class == A Ruby Code Ruby 3.2 YJIT :b if self.class == B :c if self.class == C side exit :a if self.class == A :b if self.class == B :c if self.class == C vm_send :x Ruby 3.3 YJIT setivar @x
methods ✦ Ruby 3.3 YJIT added support for them in CRuby JITs for the first time ✦ "Exceptions" are not necessarily Ruby exceptions, e.g. break/return in blocks Exception Handlers
speculating Kernel#binding is not called ✦ Ruby 3.4 will hopefully allocate registers for them too (under development) Register Allocator for Local Variables