On Wed, 19 Nov 2003 13:49:27 +0100, ts wrote: >>>>>> "S" == Simon Strandgaard <none> writes: > > S> Any ideas how to fake this? > > Well, it's easy to do for $' and $`, no idea for the rest $1, ... > > S> Any rationale why they are write-protected? > > These variables are the result of a regexp against a string : it seems a > non sense to change this result. Aree, these values should only contain output from regexp. But as a paradox I am developing my own regexp engine! I want my regexp engine to be compatible with Ruby's, therefore I want to exercise the engine with the Rubicon testsuite. But rubicon uses $& and $1-$9. I can substitute all occurencies of $& and $1-$9 in rubicon. If $& and $1-$9 assignment are impossible, then, then my regexp-engine never will get compatible with Ruby's engine :-( [RCR] remove write-protection of $&, $1-$9, $', $`, $+ or perhaps let them stay write-protected, but let assignment via const_set become possible? -- Simon Strandgaard