I was just curious as to why this is illegal.

Example:
$ irb
>> /blah/.clone
SecurityError: can't modify literal regexp
        from (irb):1:in `initialize_copy'
        from (irb):1:in `clone'
        from (irb):1
>>

Regexp.new(/blah/).clone is perfectly OK.  What's insecure about cloning
a literal regex?
-- 
Posted via http://www.ruby-forum.com/.