Module include bug with Test::Unit (ObjectSpace issue)
------------------------------------------------------

                 Key: JRUBY-3036
                 URL: http://jira.codehaus.org/browse/JRUBY-3036
             Project: JRuby
          Issue Type: Bug
    Affects Versions: JRuby 1.1.4
         Environment: jruby 1.1.4 (ruby 1.8.6 patchlevel 114) (2008-10-04 rev 
7828) [i386-java] on OS X
            Reporter: Daniel Berger
            Assignee: Thomas E Enebo
             Fix For: JRuby 1.1.5


Attempting to include a module within a Test::Unit test case causes JRuby to 
die:

{noformat}
require 'test/unit'

module Test
   module Helper
   end
end

class TC_Foo < Test::Unit::TestCase
   include Test::Helper

   def test_bogus
      assert_equal(true, 1 == 1)
   end
end
{noformat}
With MRI that works fine. With JRuby I get this:
{noformat}
/Users/djberge/Documents/workspace/jruby/lib/ruby/1.8/test/unit/collector/objectspace.rb:25:in
 `collect': undefined method `suite' for Test::Helper:Module (NoMethodError)
        from 
/Users/djberge/Documents/workspace/jruby/lib/ruby/1.8/test/unit/collector/objectspace.rb:23:in
 `each_object'
        from 
/Users/djberge/Documents/workspace/jruby/lib/ruby/1.8/test/unit/collector/objectspace.rb:23:in
 `collect'
        from 
/Users/djberge/Documents/workspace/jruby/lib/ruby/1.8/test/unit/autorunner.rb:58
        from 
/Users/djberge/Documents/workspace/jruby/lib/ruby/1.8/test/unit/autorunner.rb:213:in
 `[]'
        from 
/Users/djberge/Documents/workspace/jruby/lib/ruby/1.8/test/unit/autorunner.rb:213:in
 `run'
        from 
/Users/djberge/Documents/workspace/jruby/lib/ruby/1.8/test/unit/autorunner.rb:12:in
 `run'
        from 
/Users/djberge/Documents/workspace/jruby/lib/ruby/1.8/test/unit.rb:278
{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