Commit 17abfba
authored
fix(interpreter): get_ifs_separator respects local IFS (#902)
## Summary
- `get_ifs_separator()` only checked `self.variables` for IFS, missing
local IFS declarations stored in `call_stack.locals`. This caused `local
IFS=":"` to have no effect on `"${arr[*]}"` array joining inside
functions.
- Fix: use `expand_variable("IFS")` which checks locals first, with
proper handling of unset vs empty IFS.
- Includes regression test.
## Test plan
- [x] `cargo test --all-features -p bashkit --lib` — all 2123 tests pass
- [x] `cargo clippy --all-targets --all-features -- -D warnings` — clean
- [x] `cargo fmt --check` — clean
- [x] Regression test `test_local_ifs_array_join` covers the exact bug1 parent 9ba8460 commit 17abfba
File tree
3 files changed
+29
-6
lines changed- crates/bashkit/src
- interpreter
- supply-chain
3 files changed
+29
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7980 | 7980 | | |
7981 | 7981 | | |
7982 | 7982 | | |
7983 | | - | |
7984 | | - | |
7985 | | - | |
| 7983 | + | |
| 7984 | + | |
| 7985 | + | |
| 7986 | + | |
| 7987 | + | |
| 7988 | + | |
| 7989 | + | |
7986 | 7990 | | |
7987 | 7991 | | |
7988 | | - | |
7989 | | - | |
| 7992 | + | |
7990 | 7993 | | |
7991 | 7994 | | |
7992 | 7995 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2485 | 2485 | | |
2486 | 2486 | | |
2487 | 2487 | | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
| 2494 | + | |
| 2495 | + | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
2488 | 2508 | | |
2489 | 2509 | | |
2490 | 2510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
578 | | - | |
| 578 | + | |
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
| |||
0 commit comments