JRuby

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: JRuby 1.0.3, JRuby 1.1RC2
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

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;

Activity

Hide
Ola Bini added a comment -

Wasn't fixed but has been now.

Show
Ola Bini added a comment - Wasn't fixed but has been now.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: