File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 379
379
value = D_ARG (1 );
380
380
arg = D_ARG (2 );
381
381
382
- if (action == A_MAKE ) {
383
- // Clone an existing event?
384
- if (IS_EVENT (value )) return R_ARG1 ;
385
- else if (IS_DATATYPE (value )) {
382
+ if (action == A_MAKE || action == A_TO ) {
383
+ if (IS_EVENT (value ) || IS_DATATYPE (value )) {
386
384
if (IS_EVENT (arg )) return R_ARG2 ;
387
385
//Trap_Make(REB_EVENT, value);
388
386
VAL_SET (D_RET , REB_EVENT );
392
390
is_arg_error :
393
391
Trap_Types (RE_EXPECT_VAL , REB_EVENT , VAL_TYPE (arg ));
394
392
395
- // Initialize GOB from block:
393
+ // Initialize event from block:
396
394
if (IS_BLOCK (arg )) Set_Event_Vars (D_RET , VAL_BLK_DATA (arg ));
397
395
else goto is_arg_error ;
398
396
}
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ Rebol [
14
14
;@@ https://github.com/Oldes/Rebol-issues/issues/132
15
15
--assert event? e: make event! [type: 'connect]
16
16
--assert 'connect = e/type
17
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/2484
18
+ --assert all [event? e2: make e [offset: 0x0 ] e2/offset = 0x0 ]
17
19
18
20
--test-- "event! offset out of range"
19
21
;@@ https://github.com/Oldes/Rebol-issues/issues/1635
You can’t perform that action at this time.
0 commit comments