diff --git a/src/core/t-block.c b/src/core/t-block.c index c80efe94fa..dbb7b1930c 100644 --- a/src/core/t-block.c +++ b/src/core/t-block.c @@ -119,7 +119,7 @@ static void No_Nones_Or_Logic(REBVAL *arg) { value = BLK_SKIP(series, index); if (ANY_WORD(value)) { cnt = (VAL_WORD_SYM(value) == VAL_WORD_SYM(target)); - if (flags & AM_FIND_CASE) { + if (flags & (AM_FIND_CASE | AM_FIND_SAME)) { // Must be same type and spelling: if (cnt && VAL_TYPE(value) == VAL_TYPE(target)) return index; } diff --git a/src/tests/units/series-test.r3 b/src/tests/units/series-test.r3 index 050676767e..947754b90e 100644 --- a/src/tests/units/series-test.r3 +++ b/src/tests/units/series-test.r3 @@ -77,6 +77,14 @@ Rebol [ --assert 2 = index? find b :obj1 --assert 2 = index? find b :obj2 --assert 2 = index? find/case b :obj2 ;/case is not /same in this case + b: [a a: 'a :a] + --assert 1 = index? find/same b b/1 + --assert 2 = index? find/same b b/2 + --assert 3 = index? find/same b b/3 + --assert 4 = index? find/same b b/4 + --assert 1 = index? find b b/1 + --assert 1 = index? find b b/2 + --assert 1 = index? find b b/3 --test-- "FIND/SAME in string!" --assert "AbcdAe" = find/same "aAbcdAe" "A"