metaeducation/ren-garden

Crash when eval'ing through custom console

Closed this issue · 2 comments

The code that @hostilefork posted in Rebol and Red SO chat:

>>
timed: function ['arg [block! lit-word!] /meta] [
    if meta [
        if arg = quote 'prompt [return {timed}]
        if arg = quote 'banner [print {Timed console dialect} end]
        print {Meta evaluation}
        probe arg
        end
    ]
    start: stats/timer
    do arg
    console combine/with [
        "Command completed in"
        to-string (stats/timer - start)
    ] space
]
== #[function! ('arg /meta /local start) [...]]

>> console :timed
Timed console dialect

>> first [1 2 3] <- Runtime error here

Windows 8.1 64 bit

Works on Linux, but this might be the problem...see if this helps:

metaeducation/ren-cpp@e90ae26

Looks good, Brian. Thanks