tfpt review "/shelveset:MethodLookup;REDMOND\tomat" ''alias'' keyword, alias_method and public/private/protected methods look the method up in Object if called on a module, which we didn''t do Also, ''super'' keyword doesn''t use current ''self'' if called in class_eval/instance_eval. Tomas -------------- next part -------------- A non-text attachment was scrubbed... Name: MethodLookup.diff Type: application/octet-stream Size: 51827 bytes Desc: MethodLookup.diff URL: <http://rubyforge.org/pipermail/ironruby-core/attachments/20081007/539451a9/attachment-0001.obj>
Changes are largely good. The change involving MetaObjectBuilder.TreatRestrictionsAsConditions is pretty awkward, but I''m sure you think so too and there don''t seem to be any terribly clean alternatives. In the case we were looking at earlier today, will ResolveMethodFallbackToObject find Module.freeze or only Object.freeze? -----Original Message----- From: Tomas Matousek Sent: Tuesday, October 07, 2008 9:26 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: MethodLookup tfpt review "/shelveset:MethodLookup;REDMOND\tomat" ''alias'' keyword, alias_method and public/private/protected methods look the method up in Object if called on a module, which we didn''t do Also, ''super'' keyword doesn''t use current ''self'' if called in class_eval/instance_eval. Tomas
Yes, TreatRestrictionsAsConditions is a little ugly, but I don''t see any much cleaner way how to achieve the same. I don''t remember the exact details, let''s revisit it tomorrow. Tomas -----Original Message----- From: Curt Hagenlocher Sent: Tuesday, October 07, 2008 9:53 PM To: Tomas Matousek; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: MethodLookup Changes are largely good. The change involving MetaObjectBuilder.TreatRestrictionsAsConditions is pretty awkward, but I''m sure you think so too and there don''t seem to be any terribly clean alternatives. In the case we were looking at earlier today, will ResolveMethodFallbackToObject find Module.freeze or only Object.freeze? -----Original Message----- From: Tomas Matousek Sent: Tuesday, October 07, 2008 9:26 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: MethodLookup tfpt review "/shelveset:MethodLookup;REDMOND\tomat" ''alias'' keyword, alias_method and public/private/protected methods look the method up in Object if called on a module, which we didn''t do Also, ''super'' keyword doesn''t use current ''self'' if called in class_eval/instance_eval. Tomas
I ran my test case against MRI and determined that MRI itself would only find Object.freeze under these circumstances. I suspect that the original code in edge Rails is therefore incorrect, in that it will create a method alias for Object.freeze instead of Module.freeze. Bottom line: you''re doing the same thing as MRI so the code is okay. :) -----Original Message----- From: Curt Hagenlocher Sent: Tuesday, October 07, 2008 9:53 PM To: Tomas Matousek; IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: RE: Code Review: MethodLookup Changes are largely good. The change involving MetaObjectBuilder.TreatRestrictionsAsConditions is pretty awkward, but I''m sure you think so too and there don''t seem to be any terribly clean alternatives. In the case we were looking at earlier today, will ResolveMethodFallbackToObject find Module.freeze or only Object.freeze? -----Original Message----- From: Tomas Matousek Sent: Tuesday, October 07, 2008 9:26 PM To: IronRuby External Code Reviewers Cc: ironruby-core at rubyforge.org Subject: Code Review: MethodLookup tfpt review "/shelveset:MethodLookup;REDMOND\tomat" ''alias'' keyword, alias_method and public/private/protected methods look the method up in Object if called on a module, which we didn''t do Also, ''super'' keyword doesn''t use current ''self'' if called in class_eval/instance_eval. Tomas