On Sep 30, 2010, at 9:15 PM, David Chelimsky wrote: > On Sep 30, 2010, at 7:45 AM, Zhi-Qiang Lei wrote: > >> On Sep 30, 2010, at 7:59 PM, David Chelimsky wrote: >> >>> On Sep 30, 2010, at 4:02 AM, Zhi-Qiang Lei wrote: >>> >>>> Dear All, >>>> >>>> Class B is a subclass of class A. Could anyone tell me how to monitor if >>>> object created from class B receives a super message when its method is >>>> invoked. Thanks. >>> >>> I don't know of a way to do that. What problem are you trying to solve? > > [ I moved your post to the bottom. Please post at the bottom or in-line] > >> Class A >> def a >> #some code >> end >> end >> >> Class B >> def a >> #some code >> super >> end >> end >> >> I want to if B is receive 'super' message. Thanks. > > I understand what you meant, but I don't understand why you want to do this. > What is the bigger problem you are trying to solve? Why do you want to > monitor when super gets called? > _______________________________________________ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users
Thank you. Actually what I want is just to write a test case for it, with rspec. _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users