[REBOL] Re: Private words in objects?
From: cyphre::seznam::cz at: 5-Jul-2006 20:15
Hi Tim,
Yes, you are right. The PROTECT functionality has some quirks. It looks
PROTECTed words are detected only when using set-word! and SET function:
>> d: context[a: 1]
>> protect in d 'a
>> set in d 'a 10
** Script Error: Word a is protected, cannot modify
** Near: set in d 'a 10
>> d/a: 10
== 10
>>
Besides set-path! it also doesn't work on series!:
>> b: [1 2 3 4 5]
== [1 2 3 4 5]
>> protect 'b
>> b: 10
** Script Error: Word b is protected, cannot modify
** Near: b: 10
>> b/2: 10
== 10
>> b
== [1 10 3 4 5]
>>
>> s: "abcd"
== "abcd"
>> protect 's
>> s: 5
** Script Error: Word s is protected, cannot modify
** Near: s: 5
>> s/2: #"x"
== #"x"
>> s
== "axcd"
I tried to submit it to RAMBO but it seems the system didn't record my
submission(don't know the reason?!?) so feel free to try report it.
Regards,
Cyphre