Hi, I figured out what caused the error. The wrong commit was 896aebbe3dc6fe8e78f535956b3c0811ee11d497 as in below.
electra:jruby~main yoko$ git bisect good 896aebbe3dc6fe8e78f535956b3c0811ee11d497 is the first bad commit commit 896aebbe3dc6fe8e78f535956b3c0811ee11d497 Author: Hiro Asari <[email protected]> Date: Wed Dec 2 08:24:32 2009 -1000 JRUBY-4298: [1.9] Add Complex#rationalize Signed-off-by: Vladimir Sizikov <[email protected]> :040000 040000 b5f5dc481604cb9d469d5ac7a0a7a7679dde1f48 3d39348aa4bdbece646b61c99a1 ed6307175f52e M src This commit added just one comment and small method: electra:jruby~main yoko$ git log -p -1 --full-diff 896aebbe3dc6fe8e78f535956b3c0811ee11d497 commit 896aebbe3dc6fe8e78f535956b3c0811ee11d497 Author: Hiro Asari <[email protected]> Date: Wed Dec 2 08:24:32 2009 -1000 JRUBY-4298: [1.9] Add Complex#rationalize Signed-off-by: Vladimir Sizikov <[email protected]> diff --git a/src/org/jruby/RubyComplex.java b/src/org/jruby/RubyComplex.java index d051723..1e2cea2 100644 --- a/src/org/jruby/RubyComplex.java +++ b/src/org/jruby/RubyComplex.java @@ -912,7 +912,7 @@ public class RubyComplex extends RubyNumeric { return f_to_f(context, real); } - /** nucomp_to_f + /** nucomp_to_r * */ @JRubyMethod(name = "to_r") @@ -922,6 +922,14 @@ public class RubyComplex extends RubyNumeric { } return f_to_r(context, real); } + + /** nucomp_rationalize + * + */ + @JRubyMethod(name = "rationalize", optional = 1, compat = CompatVersion.RU + public IRubyObject rationalize(ThreadContext context, IRubyObject arg) { + return to_r(context); + } static RubyArray str_to_c_internal(ThreadContext context, IRubyObject recv RubyString s = recv.convertToString(); When I deleted "optional = 1" from the annotation of rationalize, I didn't get java.lang.VerifyError. The embed test passed on JDK 1.5. I wonder whether the annotation of rationalize method is correct or not. If the method works without "optional = 1" in the @JRubyMethod, may I delete this? -Yoko On Fri, Dec 4, 2009 at 9:35 AM, Yoko Harada <[email protected]> wrote: > Hi, > Today, embed test fails on JDK 1.5 when ruby 1.9 mode is specified. > The raised exception is: > > [junit] 致命的: Exception : > [junit] java.lang.VerifyError: (class: > org/jruby/RubyComplex$i_method_0_1$RUBYINVOKER$rationalize, method: > call signature: > (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyModule;Ljava/lang/String;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jrub > [junit] at > org.jruby.gen.org$jruby$RubyComplex$Populator.populate(org$jruby$RubyComplex$Populator.java:131) > [junit] at > org.jruby.RubyModule.defineAnnotatedMethodsIndividually(RubyModule.java:657) > [junit] at > org.jruby.RubyModule.defineAnnotatedMethods(RubyModule.java:560) > [junit] at > org.jruby.RubyComplex.createComplexClass(RubyComplex.java:92) > [junit] at org.jruby.Ruby.initCore(Ruby.java:1134) > [junit] at org.jruby.Ruby.bootstrap(Ruby.java:1031) > [junit] at org.jruby.Ruby.init(Ruby.java:1009) > [junit] at org.jruby.Ruby.newInstance(Ruby.java:173) > [junit] at > org.jruby.embed.internal.LocalContext.getRuntime(LocalContext.java:97) > [junit] at > org.jruby.embed.internal.ThreadSafeLocalContextProvider.getRuntime(ThreadSafeLocalContextProvider.java:55) > [junit] at > org.jruby.embed.ScriptingContainer.getRuntime(ScriptingContainer.java:280) > [junit] at > org.jruby.embed.bsf.JRubyEngine.initialize(JRubyEngine.java:157) > ..... > > The test succeeds on JDK 1.6. > Does anybody have an idea on this? > > -Yoko > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
