summaryrefslogtreecommitdiff
path: root/bos-dispatch.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bos-dispatch.sh')
-rw-r--r--bos-dispatch.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/bos-dispatch.sh b/bos-dispatch.sh
index cb883d8..afefb5e 100644
--- a/bos-dispatch.sh
+++ b/bos-dispatch.sh
@@ -6,10 +6,9 @@ function bos-dispatch/invoke() {
local self_id="$1";shift
local method="$1";shift
- local self
- bos-object-id/pack-self-into "$class" "$self_id" self
-
if declare -F "$class/$method" >/dev/null; then
+ local self
+ bos-object-id/pack-self-into "$class" "$self_id" self
"$class/$method" "$@"
return $?
fi
@@ -19,4 +18,5 @@ function bos-dispatch/invoke() {
local -n metaclass_object="$metaclass_ref"
$metaclass_object invoke "$class" "$self_id" "$method" "$@"
+ return $?
}