Mauricio Fern?ndez wrote:

>On Fri, Oct 14, 2005 at 05:04:59PM +0900, Charles E. Thornton wrote:
>  
>
>>Testing the My Object Dump and I am trying to cause creation
>>of a shared string object (ELTS_SHARED...)
>>
>>I tried:
>>#!/usr/bin/ruby
>>#
>># Trace Execution
>>#
>>#set_trace_func proc { |event, file, line, id, binding, classname|
>>#   printf "%8s %s:%-2d %10s %8s\n", event, file, line, id, classname }
>>#
>>v1 = "hello long message"
>>v2 = v1.sub(/([aeiou])/, '*')
>>p v2
>>
>>But No Luck:
>>
>>Can someone provide a short fragment that induces this behavior (Shared!).
>>    
>>
>
> v1 = "foo".clear
>
>  
>
Runinng 1.8.2 Produces
---------------------------------

v1 = "foo".clear     #==>  undefined method `clear' for "foo" :String

"clear" only works for HASH and ARRAY (oh yeah,  SET and QUEUE too)?

-- 
GodFather -- 667 Neighbor of the Beast