On Nov 14, 2007, at 06:48 , Jeremy Stephens wrote:
> Nobuyoshi Nakada wrote:
>> Hi,
>>
>> At Wed, 14 Nov 2007 05:56:12 +0900,
>> Jeremy Stephens wrote in [ruby-talk:278872]:
>>>
>>> Regexp.new(/blah/).clone is perfectly OK.  What's insecure about  
>>> cloning
>>> a literal regex?
>>
>> It is to prohibit /blah/.initialize_copy(/foobar/).  You may
>> know, /blah/.dup works.
>
> Thanks for the info.  Anyone know _why_ it's prohibited?  Just  
> curious.

x = /x/.dup
x.send :initialize_copy, /y/
p x # => /y/

--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars