[Nobu said:]

>> SWIG doesn't seem to use rb_define_alloc_func(), so allocator
>> of Object is used by rb_class_new_instance().  "new" works fine
>> because SWIG redefines Redirect.new (but it is deprecated now).

[And then Simon responded:]

> Is this a problem SWIG ?
> Or is this a problem with RUBY ?

[And now Lyle says:]

So far, I've purposely avoided making any changes to support Ruby's new 
allocation scheme since (at least in its initial implementation in Ruby 
1.7.x) there seemed to be some problems. There's also the issue of 
backwards compatibility with Ruby versions 1.6.x and earlier. If SWIG is 
to generate code that will compile under both Ruby 1.6 and Ruby 1.8, 
there will presumably need to be a compile-time check of the Ruby 
version number.

Since, as Nobu notes, redefining 'new' works for both Ruby 1.6 and 1.8, 
I've left it that way until now. If Matz, Nobu and others feel confident 
about the new allocation implementation in 1.8 I can revisit the issue.