Class definition error after autoload declaration
-------------------------------------------------

                 Key: JRUBY-962
                 URL: http://jira.codehaus.org/browse/JRUBY-962
             Project: JRuby
          Issue Type: Bug
          Components: Interpreter
    Affects Versions: JRuby 1.0.0RC2
         Environment: Windows XP / Java 1.6.0
            Reporter: Peter K Chan
         Attachments: jruby.patch

Consider the following:

autoload :SomeClass, 'somefile'

class SomeClass
  def to_s; 'hi'; end;
end

puts SomeClass.new.to_s

JRuby 1.0 RC2 gives this error:

:[-1,-1]:[0,0]: SomeClass is not a class. (TypeError)

Attached patch fixes the issue.

Specifically, a previous change in RubyKernel.autoload now set the reference to 
RubyUndef when setting up autoloading. However, the previous code in the 
patched section was still only checking for null and not RubyUndef.

-- 
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