id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,lang,patch,platform
1262,Simple patch for the overriding of invoke for objects,NotFound,,"This simple change makes object() works as expected for the short test case I tried:

{{{
Index: src/pmc/object.pmc
===================================================================
--- src/pmc/object.pmc	(revision 42404)
+++ src/pmc/object.pmc	(working copy)
@@ -616,8 +616,11 @@
             PMC * const meth =
                 Parrot_oo_find_vtable_override_for_class(interp, cur_class,
                                                          meth_name);
-            if (!PMC_IS_NULL(meth))
+            if (!PMC_IS_NULL(meth)) {
+                PMC *call_sig = Parrot_pcc_get_signature(interp, CURRENT_CONTEXT(interp));
+                VTABLE_unshift_pmc(interp, call_sig, SELF);
                 return VTABLE_invoke(interp, meth, next);
+	    }
 
             if (cur_class->vtable->base_type == enum_class_PMCProxy) {
                 /* Get the PMC instance and call the vtable method on that. */
}}}

This is the test:

{{{
.sub main :main
  $P0 = newclass ['myobj']
  addattribute $P0, 'name'
  $P1 = new $P0
  $P3 = new 'String'
  $P3 = 'world'
  setattribute $P1, 'name', $P3
  $P1()
.end

.namespace ['myobj']

.sub hello :method
  print 'hello, '
  $P1 = getattribute self, 'name'
  say $P1
.end

.sub 'invoke' :vtable
  self.'hello'()
.end
}}}
",patch,closed,normal,,none,1.7.0,medium,done,,,,applied,
