jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • JRuby
  • JRUBY-3144

Module#autoload uses dup copies for autoloaded constants

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Reopened Reopened
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: JRuby 1.x+
  • Component/s: RubySpec
  • Labels:
    None

Description

     [java] Module#autoload uses dup copies for autoloaded constants FAILED
     [java] Expected nil
     [java] to equal "/Users/headius/projects/jruby/spec/ruby/1.8/core/module/fixtures/autoload.rb"
     [java] 
     [java] /Users/headius/projects/jruby/spec/ruby/1.8/core/module/autoload_spec.rb:168
     [java] /Users/headius/projects/jruby/spec/ruby/1.8/core/module/fixtures/classes.rb:316:in `protect_loaded_features'
     [java] /Users/headius/projects/jruby/spec/ruby/1.8/core/module/autoload_spec.rb:160
     [java] /Users/headius/projects/jruby/spec/ruby/1.8/core/module/autoload_spec.rb:6
     [java] /Users/headius/projects/jruby/spec/ruby/1.8/core/module/autoload_spec.rb:54:in `load'

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Thomas E Enebo added a comment - 30/Nov/08 12:30 PM

The problem that is causing this is based on how we store autoloads. We store them based on their fully qualified name (based on containment): Foo::Bar for :Bar in Foo. This is ok until we dup. At that point, the autoload in the dup'd module/class can no longer find the entry. I think MRI does not have this issue because they store autoload file info into a node and store it with the undef in the module. When a clone happens it clones the module constant table which clones the file info as well.

Undef is a constant in JRuby (essentially). We cannot store file into into it easily.

Show
Thomas E Enebo added a comment - 30/Nov/08 12:30 PM The problem that is causing this is based on how we store autoloads. We store them based on their fully qualified name (based on containment): Foo::Bar for :Bar in Foo. This is ok until we dup. At that point, the autoload in the dup'd module/class can no longer find the entry. I think MRI does not have this issue because they store autoload file info into a node and store it with the undef in the module. When a clone happens it clones the module constant table which clones the file info as well. Undef is a constant in JRuby (essentially). We cannot store file into into it easily.
Hide
Permalink
Thomas E Enebo added a comment - 02/Dec/08 9:23 AM

A spec failure and not a real app error. Bumping to 1.1+ and unassigning

Show
Thomas E Enebo added a comment - 02/Dec/08 9:23 AM A spec failure and not a real app error. Bumping to 1.1+ and unassigning
Hide
Permalink
Charles Oliver Nutter added a comment - 20/Jan/09 4:16 AM

This was either fixed or the spec was removed. Updating tags.

Show
Charles Oliver Nutter added a comment - 20/Jan/09 4:16 AM This was either fixed or the spec was removed. Updating tags.
Hide
Permalink
Charles Oliver Nutter added a comment - 20/Jan/09 4:17 AM

Oops, nevermind, I botched the mspec run.

Show
Charles Oliver Nutter added a comment - 20/Jan/09 4:17 AM Oops, nevermind, I botched the mspec run.
Hide
Permalink
Thomas E Enebo added a comment - 23/Feb/09 4:16 PM

Bumping to 1.x since this is a pretty obscure failure and the amount of work to fix it sort of sucks...

Show
Thomas E Enebo added a comment - 23/Feb/09 4:16 PM Bumping to 1.x since this is a pretty obscure failure and the amount of work to fix it sort of sucks...

People

  • Assignee:
    Charles Oliver Nutter
    Reporter:
    Charles Oliver Nutter
Vote (0)
Watch (0)

Dates

  • Created:
    13/Nov/08 10:26 AM
    Updated:
    23/Feb/09 4:16 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.