@@ -1607,8 +1607,7 @@ private record RegexpArgs(RubyString string, int options, IRubyObject timeout) {
16071607
16081608 // MRI: reg_extract_args - This does not break the regexp into a String value since it will never used if the first
16091609 // argument is a Regexp. This also is true of MRI so I am not sure why they do the string part.
1610- private static RegexpArgs extractRegexpArgs (ThreadContext context , IRubyObject [] args ) {
1611- int callInfo = ThreadContext .resetCallInfo (context );
1610+ private static RegexpArgs extractRegexpArgs (ThreadContext context , final int callInfo , IRubyObject [] args ) {
16121611 int length = args .length ;
16131612
16141613 IRubyObject timeout = null ;
@@ -1631,9 +1630,10 @@ private static RegexpArgs extractRegexpArgs(ThreadContext context, IRubyObject[]
16311630 return new RegexpArgs (string , opts , timeout );
16321631 }
16331632
1634- @ JRubyMethod (name = "linear_time?" , meta = true , required = 1 , optional = 1 )
1633+ @ JRubyMethod (name = "linear_time?" , meta = true , required = 1 , optional = 1 , keywords = true )
16351634 public static IRubyObject linear_time_p (ThreadContext context , IRubyObject recv , IRubyObject [] args ) {
1636- RegexpArgs regexpArgs = extractRegexpArgs (context , args );
1635+ final int callInfo = ThreadContext .resetCallInfo (context );
1636+ RegexpArgs regexpArgs = extractRegexpArgs (context , callInfo , args );
16371637 RubyRegexp regexp = args [0 ] instanceof RubyRegexp reg ?
16381638 reg : newRegexpFromStr (context .runtime , regexpArgs .string , regexpArgs .options );
16391639
0 commit comments