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
Implicit super in module_eval/instance_eval with an unrelated self calls the method instead of raising TypeError #136
Implicit-argument super inside a block run with a different self (module_eval, instance_eval, a class body in eval) calls the superclass method anyway. CRuby refuses:
classC;deffoo;:c;end;endclassB < C;deffoo;[:b,(A.module_eval{super}rescue $!.class)];end;endclassA;endpB.new.foo# CRuby: [:b, TypeError] (self has wrong type to call super in this context: Class (expected B))# IronRuby: [:b, :c]
Likewise super in a class E ... end body inside eval within a method: CRuby says "super called outside of method", IronRuby calls the method's super.
Found by running the scripts PR #119 deleted (Tests/Experiments, Tests/Legacy) on CRuby 4.0.9 and on IronRuby built from master c7f70cf (net10.0, Linux). (Experiments/Super/Scoping2.rb, Scoping4.rb)
Activity
Merge pull request #148 from Largo/claude/core-fixes-2