jirb_swing broken: JRuby picking wrong constructor, with no obvious work around -------------------------------------------------------------------------------
Key: JRUBY-4680 URL: http://jira.codehaus.org/browse/JRUBY-4680 Project: JRuby Issue Type: Bug Affects Versions: JRuby 1.5 Environment: Ubuntu, openjdk 6 Reporter: Damian Steer Assignee: Thomas E Enebo jirb_swing is currently crashing on the line: {noformat} text.caret_color = Color.new(0xa4, 0x00, 0x00) java/awt/Color.java:314:in `testColorValueRange': java.lang.IllegalArgumentException: Color parameter outside of expected range: Red (NativeException) from java/awt/Color.java:398:in `<init>' from java/awt/Color.java:373:in `<init>' from java/awt/Color.java:464:in `<init>' from sun/reflect/NativeConstructorAccessorImpl.java:-2:in `newInstance0' from sun/reflect/NativeConstructorAccessorImpl.java:57:in `newInstance {noformat} The reason is that Color accepts three integers (0-255) or three floats (0-1). JRuby used to pick the former, but since http://github.com/jruby/jruby/commit/78c4199e12db9c1de082ab989b00a9092c952ae2 it's choosing the latter and hence throwing an exception. I can't see a way to select the correct constructor using java_send, which would let us work around it. -- 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