diff options
Diffstat (limited to 'bos-mop.sh')
-rw-r--r-- | bos-mop.sh | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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}" |