summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bos-mop.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/bos-mop.sh b/bos-mop.sh
index e18baec..7cd28c7 100644
--- a/bos-mop.sh
+++ b/bos-mop.sh
@@ -27,7 +27,7 @@ function bos/mop/base/find-method-into() {
# if we don't have a $start_from_class, it means we're doing the
# initial method resolution, so don't skip any class in $mro
if [[ -n "$start_from_class" ]]; then
- for (( ; idx <= "${#mro}" ; ++idx )); do
+ for (( ; idx < "${#mro[@]}" ; ++idx )); do
if [[ "${mro[$idx]}" == "$start_from_class" ]]; then
(( ++idx ))
break
@@ -35,7 +35,7 @@ function bos/mop/base/find-method-into() {
done
fi
- for (( ; idx <= "${#mro}" ; ++idx )); do
+ for (( ; idx < "${#mro[@]}" ; ++idx )); do
local full_name="${mro[$idx]}/${method}"
if declare -F "$full_name" >/dev/null; then
result="${full_name}"