[Kde-bindings] Constructor error with QtRuby redux

Richard Dale Richard_Dale at tipitina.demon.co.uk
Tue Dec 6 14:36:37 UTC 2005


On Tuesday 06 December 2005 13:22, Caleb Tennis wrote:
> Okay, I just ran some debugging with Ruby 1.8.3 and Ruby 1.8.4_pre1 and
> the difference is this:
>
> in Qt.cpp new_qt:
>
>    if (rb_respond_to(result, rb_intern("initialize")) != 0) {
>         rb_obj_call_init(result, argc, argv);
>     }
>
> This never gets called in Ruby 1.8.4_pre1&2.  The "result" object looks
> identical between Ruby versions, though.  Thus, it seems as though the
> catch and throw is happening properly, but the object doesn't know it
> responds to initialize.
I've been using the stable snapshot:

baldhead duke 1009% ruby -v
ruby 1.8.4 (2005-12-01) [powerpc-linux]

	int respond_to_result = rb_respond_to(result, rb_intern("initialize"));
	printf("respond_to_result: %d\n", respond_to_result);
	rb_obj_call_init(result, argc, argv);

I've just removed the rb_respond_to() test, and it works fine. It returns a 
zero result with ruby 1.8.4, and 2 with 1.8.2.

I can't see anything wrong with the test being removed - should we just do 
that? I've forgotten why I've included it in the first place, but it does 
seem redundant.

-- Richard



More information about the Kde-bindings mailing list