[Kde-bindings] KDE/kdebindings/qtruby

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


SVN commit 486010 by rdale:

2005-12-06  Richard Dale  <Richard_Dale at tipitina.demon.co.uk>

* QtRuby didn't work with versions of ruby > 1.8.3, as it didn't call
  initialize methods correctly. It used the rb_respond_to() method
  to check it a newly created qt instance responded to :initialize.
  However, in newer versions of ruby rb_responds_to() ignores
  private methods such as initialize(). The solution was to just remove
  the test, as it was redundant anyway.
* Fixes problem reported by Hans Fugel and Caleb Tennis.

CCMAIL: kde-bindings at kde.org



 M  +10 -0     ChangeLog  
 M  +1 -4      rubylib/qtruby/Qt.cpp  


--- trunk/KDE/kdebindings/qtruby/ChangeLog #486009:486010
@@ -1,3 +1,13 @@
+2005-12-06  Richard Dale  <Richard_Dale at tipitina.demon.co.uk>
+
+	* QtRuby didn't work with versions of ruby > 1.8.3, as it didn't call
+	  initialize methods correctly. It used the rb_respond_to() method
+	  to check it a newly created qt instance responded to :initialize.
+	  However, in newer versions of ruby rb_responds_to() ignores
+	  private methods such as initialize(). The solution was to just remove
+	  the test, as it was redundant anyway.
+	* Fixes problem reported by Hans Fugel and Caleb Tennis.
+
 2005-11-21  Richard Dale  <Richard_Dale at tipitina.demon.co.uk>
 
 	* When dispose() was used to delete a ruby instance, the mapping between
--- trunk/KDE/kdebindings/qtruby/rubylib/qtruby/Qt.cpp #486009:486010
@@ -1705,10 +1705,7 @@
 	}
 
 	VALUE result = rb_funcall2(qt_internal_module, rb_intern("try_initialize"), argc+1, temp_stack);
-
-	if (rb_respond_to(result, rb_intern("initialize")) != 0) {
-		rb_obj_call_init(result, argc, argv);
-	}
+	rb_obj_call_init(result, argc, argv);
 	
 	return result;
 }



More information about the Kde-bindings mailing list