@@ -239,7 +239,7 @@ public static RubyHash deconstruct_keys(ThreadContext context, IRubyObject self,
239239 @ JRubyMethod (keywords = true , optional = 1 , checkArity = false )
240240 public static IRubyObject with (ThreadContext context , IRubyObject self , IRubyObject [] args ) {
241241 IRubyObject kwargs = IRRuntimeHelpers .receiveKeywords (context , args , false , true , false );
242- if (kwargs == UndefinedValue . UNDEFINED || kwargs . isNil ( )) {
242+ if (!( kwargs instanceof RubyHash )) {
243243 checkArgumentCount (context , args .length , 0 , 0 );
244244 return self ;
245245 }
@@ -249,7 +249,7 @@ public static IRubyObject with(ThreadContext context, IRubyObject self, IRubyObj
249249 RubyHash kwargsHash = (RubyHash ) kwargs ;
250250 RubyHash h = to_h (context , self , Block .NULL_BLOCK );
251251 h .addAll (context , kwargsHash );
252- setCallInfo ( context , CALL_KEYWORD ) ;
252+ context . callInfo = CALL_KEYWORD ;
253253 return DataMethods .rbNew (context , self .getMetaClass (), h );
254254 }
255255
@@ -277,7 +277,7 @@ public static IRubyObject rbNew(ThreadContext context, IRubyObject self, IRubyOb
277277
278278 IRubyObject dataObject = klass .getAllocator ().allocate (context .runtime , klass );
279279
280- setCallInfo ( context , ThreadContext .CALL_KEYWORD ) ;
280+ context . callInfo = ThreadContext .CALL_KEYWORD ;
281281
282282 // TODO: avoid initialize and hash overhead for known types
283283 dataObject .getMetaClass ().getBaseCallSite (RubyClass .CS_IDX_INITIALIZE )
@@ -326,7 +326,7 @@ public static IRubyObject rbNew(ThreadContext context, IRubyObject self, IRubyOb
326326
327327 IRubyObject dataObject = klass .getAllocator ().allocate (context .runtime , klass );
328328
329- setCallInfo ( context , callInfo ) ;
329+ context . callInfo = callInfo ;
330330
331331 // TODO: avoid initialize and hash overhead for known types
332332 dataObject .getMetaClass ().getBaseCallSite (RubyClass .CS_IDX_INITIALIZE )
0 commit comments