History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-1534
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Ola Bini
Reporter: Charles Oliver Nutter
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JRuby

ThreadLibrary Queue#num_waiting and Zlib to_io method not bound correctly.

Created: 06/Nov/07 03:25 PM   Updated: 22/Dec/07 06:26 AM
Component/s: None
Affects Version/s: None
Fix Version/s: JRuby 1.0.3, JRuby 1.1RC2

Time Tracking:
Not Specified


 Description  « Hide
See the attached patch. I believe this is fixed on trunk (and in 1.1b1), but confirm it.
Index: src/org/jruby/RubyZlib.java
===================================================================
--- src/org/jruby/RubyZlib.java (revision 4866)
+++ src/org/jruby/RubyZlib.java (working copy)
@@ -663,7 +663,7 @@
             return orig_name == null ? getRuntime().getNil() : getRuntime().newString(orig_name);
         }
         
-        public Object to_io() {
+        public IRubyObject to_io() {
             return realIo;
         }
         
Index: src/org/jruby/libraries/ThreadLibrary.java
===================================================================
--- src/org/jruby/libraries/ThreadLibrary.java  (revision 4866)
+++ src/org/jruby/libraries/ThreadLibrary.java  (working copy)
@@ -249,7 +249,7 @@
             return RubyNumeric.int2fix(getRuntime(), entries.size());
         }
 
-        public int num_waiting() { return 0; }
+        public IRubyObject num_waiting() { return getRuntime().newFixnum(0); }
 
         public synchronized IRubyObject pop(IRubyObject[] args) {
             boolean should_block = true;


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Ola Bini - 29/Nov/07 08:35 AM
Wasn't fixed but has been now.