jruby.reify.classes raising error with optparse
-----------------------------------------------

                 Key: JRUBY-5221
                 URL: http://jira.codehaus.org/browse/JRUBY-5221
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.6
         Environment: Linux/OSX

karl:~ karl$ jruby -v
jruby 1.6.0.dev (ruby 1.8.7 patchlevel 249) (2010-11-24 6adabd0) (Java
HotSpot(TM) 64-Bit Server VM 1.6.0_20) [darwin-x86_64-java]
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)

            Reporter: Karl Baum
            Priority: Minor


Just by requiring optparse, we get the error.  Within test.rb:


require 'optparse'

Then with debug level on:

karl:~ karl$ jruby -d -J-Djruby.reify.classes=true test.rb
java.lang.ClassFormatError: Duplicate method name&signature in class file 
ruby/OptionParser/Switch
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
        at 
org.jruby.util.ClassCache$OneShotClassLoader.defineClass(ClassCache.java:68)
        at org.jruby.RubyClass.reify(RubyClass.java:1354)
        at org.jruby.RubyClass.reify(RubyClass.java:1142)
        at org.jruby.RubyObject$2.reifyAncestors(RubyObject.java:187)
        at org.jruby.RubyObject$2.reifyAncestors(RubyObject.java:186)
        at org.jruby.RubyObject$2.allocate(RubyObject.java:180)
        at org.jruby.RubyClass.allocate(RubyClass.java:215)
        at org.jruby.RubyClass$SpecificArityNew.call(RubyClass.java:809)
        at 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:303)
        at 
org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:121)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:126)
        at 
org.jruby.ast.CallNoArgBlockNode.interpret(CallNoArgBlockNode.java:64)
        at 
org.jruby.ast.AttrAssignTwoArgNode.interpret(AttrAssignTwoArgNode.java:36)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
        at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
        at 
org.jruby.evaluator.ASTInterpreter.evalClassDefinitionBody(ASTInterpreter.java:199)
        at org.jruby.ast.ClassNode.interpret(ClassNode.java:141)
        at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
        at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
        at org.jruby.ast.RootNode.interpret(RootNode.java:129)
        at org.jruby.Ruby.runInterpreter(Ruby.java:715)
        at org.jruby.Ruby.loadFile(Ruby.java:2559)
        at org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
        at 
org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:710)
        at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:318)
        at org.jruby.runtime.load.LoadService.require(LoadService.java:365)
        at 
org.jruby.runtime.load.LoadService.lockAndRequire(LoadService.java:290)
        at org.jruby.RubyKernel.requireCommon(RubyKernel.java:1053)
        at org.jruby.RubyKernel.require(RubyKernel.java:1036)
        at 
org.jruby.RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.call(org/jruby/RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.gen:65535)
        at 
org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:319)
        at 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:313)
        at 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:152)
        at test.__file__(test.rb:1)
        at test.load(test.rb)
        at org.jruby.Ruby.runScript(Ruby.java:688)
        at org.jruby.Ruby.runNormally(Ruby.java:571)
        at org.jruby.Ruby.runFromMain(Ruby.java:414)
        at org.jruby.Main.run(Main.java:304)
        at org.jruby.Main.run(Main.java:144)
        at org.jruby.Main.main(Main.java:113)
test.rb:1:in `require': load error: optparse -- java.lang.ClassFormatError: 
Duplicate method name&signature in class file ruby/OptionParser/Switch 
(LoadError)
        from test.rb:1

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