Problems when building C extensions with ruby 1.8.7

Hello to everyone. Today, I just tried installing ruby 1.8.7, and now
I’m
having problems compiling a C extension for it. In particular, the
extension
was svn version of korundum/qt-ruby, which compiled correctly with ruby
1.8.6.
Now, I’m getting this message:

/home/stefano/Desktop/kdebindings/ruby/qtruby/src/Qt.cpp: In function
‘VALUE
method_missing(int, VALUE*, VALUE)’:
/home/stefano/Desktop/kdebindings/ruby/qtruby/src/Qt.cpp:715: error:
invalid
conversion from ‘const char*’ to ‘char*’

The line in question reads:

char * methodName = rb_id2name(SYM2ID(argv[0]));

I thought that ruby-1.8.7 and ruby 1.8.6 had the same C API, but
apparently
it’s not so. Does anyone know more about similar issue? Should I report
it to
the qtruby developers or is it a bug in ruby itself?

Stefano

On Jun 9, 9:11 am, Stefano C. [email protected] wrote:

The line in question reads:

char * methodName = rb_id2name(SYM2ID(argv[0]));

I thought that ruby-1.8.7 and ruby 1.8.6 had the same C API, but apparently
it’s not so. Does anyone know more about similar issue? Should I report it to
the qtruby developers or is it a bug in ruby itself?
Thanks for the bug report, it looks like that function changed from
being a ‘char *’ to a ‘const char *’ in Ruby 1.8.7. I’ve fixed it in
the QtRuby svn now, but haven’t had time to actually try building and
testing against 1.8.7 yet.

– Richard