Fixing bug with multiline string in properties.

This commit is contained in:
Ad5001 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 $usingObj.print
``` ```
**NOTE**: When `using` a namespace which contains static classes, please note that the static class file will be re-imported. **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 varName=$1
prop=$2 prop=$2
if [ "$3" == "=" ]; then if [ "$3" == "=" ]; then
eval "_${varName}_properties[$prop]='${@:4}'" eval "_${varName}_properties[$prop]=\"${@:4}\""
else else
eval "echo \${_${varName}_properties[$prop]}" eval "echo \${_${varName}_properties[$prop]}"
fi fi