Fixing bug with multiline string in properties.

This commit is contained in:
Adsooi 2021-12-29 20:08:30 +01:00
parent ba000379d7
commit bb25c6e7a8
Signed by: Ad5001
GPG key ID: EF45F9C6AFE20160
2 changed files with 2 additions and 1 deletions

View file

@ -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.

2
oop.sh
View file

@ -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