[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Correctly handling the deprecation of rb_enable_super

Nathaniel Talbott

9/11/2003 8:47:00 PM

I'm using a library (ruby-odbc 0.99 to be exact) that calls
rb_enable_super(), which is obsolete as of ruby 1.8.0. Of course, this
causes said library to spit out warnings at me when I use it. I want to
submit a patch to the author to remove the warnings, but I'm not sure of the
correct way to fix it such that the library will still work under 1.6.x. Can
a C/Ruby guru out there give me a hand?

Thanks,


Nathaniel

<:((><


1 Answer

nobu.nokada

9/12/2003 2:45:00 AM

0

Hi,

At Fri, 12 Sep 2003 05:47:08 +0900,
Nathaniel Talbott wrote:
> I''m using a library (ruby-odbc 0.99 to be exact) that calls
> rb_enable_super(), which is obsolete as of ruby 1.8.0. Of course, this
> causes said library to spit out warnings at me when I use it. I want to
> submit a patch to the author to remove the warnings, but I''m not sure of the
> correct way to fix it such that the library will still work under 1.6.x. Can
> a C/Ruby guru out there give me a hand?

#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
rb_enable_super(klass, funcname);
#endif

This wouldn''t work with transitional versions from 2003/02/09
until 2003/07/16, however, they are deprecated.

--
Nobu Nakada