@@ -234,9 +234,6 @@ private static class GlobOptions {
234234 private static void globOptions (ThreadContext context , IRubyObject [] args , String [] keys , GlobOptions options ) {
235235 Ruby runtime = context .runtime ;
236236
237- // just clear callInfo for now; future PR will handle it appropriately
238- ThreadContext .resetCallInfo (context );
239-
240237 if (args .length > 1 ) {
241238 IRubyObject tmp = TypeConverter .checkHashType (runtime , args [args .length - 1 ]);
242239 boolean processFlags = keys == BASE_FLAGS_KEYWORDS ;
@@ -277,6 +274,7 @@ private static void globOptions(ThreadContext context, IRubyObject[] args, Strin
277274
278275 @ JRubyMethod (name = "[]" , rest = true , meta = true , keywords = true )
279276 public static IRubyObject aref (ThreadContext context , IRubyObject recv , IRubyObject [] args ) {
277+ ThreadContext .resetCallInfo (context );
280278 Ruby runtime = context .runtime ;
281279 GlobOptions options = new GlobOptions ();
282280 globOptions (context , args , BASE_KEYWORDS , options );
@@ -324,8 +322,9 @@ private static ByteList globArgumentAsByteList(ThreadContext context, IRubyObjec
324322 * with each filename is passed to the block in turn. In this case, Nil is
325323 * returned.
326324 */
327- @ JRubyMethod (required = 1 , optional = 2 , checkArity = false , meta = true )
325+ @ JRubyMethod (required = 1 , optional = 2 , checkArity = false , meta = true , keywords = true )
328326 public static IRubyObject glob (ThreadContext context , IRubyObject recv , IRubyObject [] args , Block block ) {
327+ ThreadContext .resetCallInfo (context );
329328 Arity .checkArgumentCount (context , args , 1 , 3 );
330329
331330 Ruby runtime = context .runtime ;
0 commit comments