diff --git a/README.md b/README.md index 5355350..5355911 100644 --- a/README.md +++ b/README.md @@ -1742,7 +1742,7 @@ Functions for handling variables. ### variable::is_array() Check if given variable is array. -Note: Pass the variable name instead of value of the variable. +Pass the variable name instead of value of the variable. #### Example diff --git a/src/variable.sh b/src/variable.sh index 985c8a5..230553f 100644 --- a/src/variable.sh +++ b/src/variable.sh @@ -4,7 +4,7 @@ # @brief Functions for handling variables. # @description Check if given variable is array. -# Note: Pass the variable name instead of value of the variable. +# Pass the variable name instead of value of the variable. # # @example # arr=("a" "b" "c") @@ -37,7 +37,7 @@ variable::is_array() { # @exitcode 0 If input is number. # @exitcode 1 If input is not a number. variable::is_numeric() { - re='^[0-9]+$' + declare re='^[0-9]+$' if [[ ${1} =~ $re ]]; then return 0 fi