> Hi,
> 
> This worked for me:
> 
> irb(main):023:0> class NString < String
> irb(main):024:1>  def gsub!(*args, &blk)
> irb(main):025:2>  super(*args, &blk)
> irb(main):026:2> end
> irb(main):027:1> end
> => nil
> irb(main):028:0> s = NString.new("hi")
> => "hi"
> irb(main):029:0>  s.gsub!(/(hi)/){$1}
> => "hi"
> 
> Hope this helps,
> 
> Jesus.


Hi Jesus, thank you for your response.  Unfortunately, I could not 
replicate your results:


>> class NString < String
>> def gsub!(*args, &blk)
>> super(*args, &blk)
>> end
>> end
=> nil
>> s = NString.new("hi")
=> "hi"
>> s.gsub!(/(hi)/){$1}
=> ""


Perhaps it is my version of ruby?
~$ ruby -v
ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]


Lou
-- 
Posted via http://www.ruby-forum.com/.