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

                 Key: JRUBY-1534
                 URL: http://jira.codehaus.org/browse/JRUBY-1534
             Project: JRuby
          Issue Type: Bug
            Reporter: Charles Oliver Nutter
            Assignee: Thomas E Enebo
             Fix For: JRuby 1.0.3, JRuby 1.1


See the attached patch. I believe this is fixed on trunk (and in 1.1b1), but 
confirm it.

{noformat}
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/compiler/impl/StandardASMCompiler.java
===================================================================
--- src/org/jruby/compiler/impl/StandardASMCompiler.java        (revision 4866)
+++ src/org/jruby/compiler/impl/StandardASMCompiler.java        (working copy)
@@ -289,7 +289,7 @@
         cv.visitField(ACC_STATIC | ACC_PRIVATE | ACC_FINAL, "$isClassLoaded", 
cg.ci(Boolean.TYPE), null, Boolean.FALSE);
         cv.visitField(ACC_STATIC | ACC_PRIVATE | ACC_FINAL, "$class", 
cg.ci(Class.class), null, null);
         
-        SkinnyMethodAdapter mv = new 
SkinnyMethodAdapter(cv.visitMethod(ACC_PUBLIC, "<clinit>", cg.sig(Void.TYPE), 
null, null));
+        SkinnyMethodAdapter mv = new 
SkinnyMethodAdapter(cv.visitMethod(ACC_PUBLIC | ACC_STATIC, "<clinit>", 
cg.sig(Void.TYPE), null, null));
         mv.start();
         
         // This is a little hacky...since clinit recurses, set a boolean so we 
don't continue trying to load class
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;
{noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to