Skip to content

Commit

Permalink
FIX: words-of map normalizes KEY words to be always ordinary word
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Jan 18, 2019
1 parent c600d8a commit cbc67ca
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/core/t-map.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,14 @@
out = BLK_HEAD(blk);
for (val = BLK_HEAD(mapser); NOT_END(val) && NOT_END(val+1); val += 2) {
if (!IS_NONE(val+1)) {
if (what <= 0) *out++ = val[0];
if (what >= 0) *out++ = val[1];
if (what < 0) {
// words-of
*out++ = val[0];
if (ANY_WORD(val)) VAL_SET(out - 1, REB_WORD);
}
else if (what == 0)
*out++ = val[0]; // body-of
if (what >= 0) *out++ = val[1]; // values
}
}

Expand Down

0 comments on commit cbc67ca

Please sign in to comment.