We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
insert
object!
1 parent 70b729b commit e837a88Copy full SHA for e837a88
src/core/t-object.c
@@ -432,6 +432,7 @@ static REBSER *Trim_Object(REBSER *obj)
432
Trap_Make(type, arg);
433
434
case A_APPEND:
435
+ case A_INSERT:
436
TRAP_PROTECT(VAL_SERIES(value));
437
if (IS_OBJECT(value)) {
438
Append_Obj(VAL_OBJ_FRAME(value), arg);
src/tests/units/object-test.r3
@@ -44,6 +44,11 @@ Rebol [
44
obj: object []
45
--assert 1 = extend obj 'a 1
46
--assert 1 = obj/a
47
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/789
48
+ --assert 2 = append obj 'b 2
49
+ --assert 2 = obj/b
50
+ --assert 3 = insert obj 'c 3
51
+ --assert 3 = obj/c
52
--test-- "extend object with hidden value"
53
;@@ https://github.com/Oldes/Rebol-issues/issues/1140
54
obj: object [a: 1 protect/hide 'a]
0 commit comments