[parrot/parrot] 37cb14: [core] fix sub dispatch with builtin namespace

GitHub noreply at github.com
Wed Feb 17 18:19:22 UTC 2016

  Branch: refs/heads/smoke-me/builtin+sub-gh304
  Home:   https://github.com/parrot/parrot
  Commit: 37cb14f2c3d49d9c940c9bbbb88c6bca448d1983
  Author: Reini Urban <rurban at cpanel.net>
  Date:   2016-02-17 (Wed, 17 Feb 2016)

  Changed paths:
    M config/gen/makefiles/root.in
    M include/parrot/sub.h
    M src/oo.c
    M src/pmc/object.pmc

  Log Message:
  [core] fix sub dispatch with builtin namespace

Filter out pure-subs without a method attribute in
Parrot_find_method_direct(). This harmonizes behavior
with user-defined namespaces.

    P1=new Integer

    namespace Integer
    sub foo

Does now error with
      Method foo not found for invocant of class Integer
as it happens with subs of new namespaces.
You need to add a :method attribute.

This allows to write user class methods that translate behaviors.
Fixes GH #304, prev. TT #1108

More information about the parrot-commits mailing list