From bb25c6e7a83d0c291b6d9229460835cceff8761f Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Wed, 29 Dec 2021 20:08:30 +0100 Subject: [PATCH] Fixing bug with multiline string in properties. --- README.md | 1 + oop.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index de7c95b..5302f0e 100644 --- a/README.md +++ b/README.md @@ -126,3 +126,4 @@ Object usingObj "New" $usingObj.print ``` **NOTE**: When `using` a namespace which contains static classes, please note that the static class file will be re-imported. +**NOTE**: `using` is not file contextual. So `using` a namespace will use it in every bash script. diff --git a/oop.sh b/oop.sh index aed88b8..07ab7b8 100644 --- a/oop.sh +++ b/oop.sh @@ -167,7 +167,7 @@ _accessProperty() { varName=$1 prop=$2 if [ "$3" == "=" ]; then - eval "_${varName}_properties[$prop]='${@:4}'" + eval "_${varName}_properties[$prop]=\"${@:4}\"" else eval "echo \${_${varName}_properties[$prop]}" fi