MoeOrganization / moe

An -OFun prototype of an Ultra Modern Perl 5
http://moe.iinteractive.com
MIT License
278 stars 46 forks source link

Fix getAttribute&getMethod to work under inheritance, tests too #18

Closed sartak closed 11 years ago

sartak commented 11 years ago
hasMethod and hasAttribute both check whether the method/attribute
exists in the inheritance hierarchy, so we need the local check
here instead. Otherwise when you inherit "foo" then you get an error
on methods("foo").
stevan commented 11 years ago

Shawn,

I suspect that Cory's previous patch to yours actually fixed the behavior, but I would like to still keep your test, can you resubmit this?

stevan commented 11 years ago

Shawn, actually I just grabbed your test and added it in (with some minor changes based on Cory's last refactoring).

https://github.com/stevan/moe/commit/015790e010fa48d44a65114d6686b5150282156d