Kai D created JRUBY-6571: ---------------------------- Summary: StackOverflow when calling java.util.regex.Matcher#end Key: JRUBY-6571 URL: https://jira.codehaus.org/browse/JRUBY-6571 Project: JRuby Issue Type: Bug Components: Java Integration Affects Versions: JRuby 1.6.7 Environment: java version "1.7.0_02" Java(TM) SE Runtime Environment (build 1.7.0_02-b13) Java HotSpot(TM) 64-Bit Server VM (build 22.0-b10, mixed mode)
jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_02) [linux-amd64-java] Reporter: Kai D Priority: Minor {code:ruby} require "java" import "java.util.regex.Pattern" import "java.util.regex.Matcher" s = "hello world" r = Pattern.compile("[eo]") m = r.matcher(s) while m.find() puts m.start #=> 1 puts m.end #=> ArgumentError: wrong number of arguments (0 for 1) #=> (root) at foo.rb:9 puts m.end(0) #=> StackOverflow end {code} The call of java.util.regex.Matcher#end with no argument throws an illegal ArgumentError (but java overloads the method with #end() and #end(int)). If I call the method with one argument, a stack overflow occurs. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.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