aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bashast/libbashWalker.g3
-rw-r--r--scripts/compound_command.bash12
2 files changed, 14 insertions, 1 deletions
diff --git a/bashast/libbashWalker.g b/bashast/libbashWalker.g
index f57f403..95f8a90 100644
--- a/bashast/libbashWalker.g
+++ b/bashast/libbashWalker.g
@@ -1068,7 +1068,8 @@ case_clause[const std::string& target] returns[bool matched]
else
{
$matched = false;
- seek_to_next_tree(ctx);
+ if(LA(1) == CASE_COMMAND)
+ seek_to_next_tree(ctx);
}
})
|CASE_PATTERN;
diff --git a/scripts/compound_command.bash b/scripts/compound_command.bash
index 0d3321e..36161fe 100644
--- a/scripts/compound_command.bash
+++ b/scripts/compound_command.bash
@@ -361,3 +361,15 @@ for ((i = "${#python_versions[@]}"; i >= 0; i--))
do
echo $i
done
+EAPI="4"
+case ${EAPI} in
+ 0|1)
+ echo "Unsupported EAPI=${EAPI} (too old) for ruby-ng.eclass" ;;
+ 2|3);;
+ 4)
+ # S is no longer automatically assigned when it doesn't exist.
+ S="${WORKDIR}"
+ ;;
+ *)
+ echo "Unknown EAPI=${EAPI} for ruby-ng.eclass"
+esac