Summary: | qtruby Qt::Socket::connectToHost fails on open call | ||
---|---|---|---|
Product: | [Developer tools] bindings | Reporter: | Caleb Tennis <caleb> |
Component: | general | Assignee: | kde-bindings |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Caleb Tennis
2005-02-24 15:13:18 UTC
On Thursday 24 February 2005 15:13, Caleb Tennis wrote: > ------- You are receiving this mail because: ------- > You are the assignee for the bug, or are watching the assignee. > > http://bugs.kde.org/show_bug.cgi?id=100165 > Summary: qtruby Qt::Socket::connectToHost fails on open call > Product: bindings > Version: unspecified > Platform: unspecified > OS/Version: Linux > Status: NEW > Severity: normal > Priority: NOR > Component: general > AssignedTo: kde-bindings mail kde org > ReportedBy: caleb gentoo org > > > Version: (using KDE KDE 3.3.92) > OS: Linux > > It is a known problem: > http://rubyforge.org/forum/forum.php?thread_id=1832&forum_id=723 > > My workaround for this, which could probably be integrated into qtruby.rb > somehow is to do this: > > > module Kernel > > def undef_open > alias_method :aliased_open, :open > undef_method :open > end > > def def_open > alias_method :open, :aliased_open > undef_method :aliased_open > end > > end > > Then, anywhere where I do a connectToHost, I simply put an undef_open and > def_open around it. > > It may be possible to directly override connectToHost and provide this > functionality as well. _______________________________________________ Which version of QtRuby are you using? I fixed this when the problem when it was first reported. Here is the code from qtruby.rb: module Kernel alias_method :_exec, :exec undef_method :exec # Kernel has a method called open() which takes a String as # the first argument. When a call is made to an open() method # in the Qt classes, it messes up the method_missing() # logic to divert it to the Smoke library. This code # fixes that problem by calling the appropriate method based # on the type of the first arg. alias_method :_open, :open def open(*k) if k.length > 0 and k[0].kind_of? String _open(*k) else method_missing(:open, *k) end end end So it looks at the args passed to Kernel.open() and calls the standard ruby version if the first arg is a String. -- Richard Should be 3.3.2, is it only fixed in 3.4 ? On Friday 25 February 2005 13:37, Caleb Tennis wrote: > ------- You are receiving this mail because: ------- > You are the assignee for the bug, or are watching the assignee. > > http://bugs.kde.org/show_bug.cgi?id=100165 > > > > > ------- Additional Comments From caleb gentoo org 2005-02-25 13:37 ------- > Should be 3.3.2, is it only fixed in 3.4 ? It's fixed in QtRuby 1.0.6 onwards - the change was added on Dec 30th last year. -- Richard Allrighty, let's mark it as fixed |