@@ -92,33 +92,39 @@ public IRubyObject construct(ThreadContext context) throws Throwable {
9292 Opcodes .H_INVOKESTATIC ,
9393 p (RangeObjectSite .class ),
9494 "bootstrapStrings" ,
95- sig (CallSite .class , MethodHandles .Lookup .class , String .class , MethodType .class , String .class , String .class , int .class , String .class , String .class , int .class , int .class ),
95+ sig (CallSite .class , MethodHandles .Lookup .class , String .class , MethodType .class , String .class , String .class , int .class , String .class , String .class , int .class , String . class , int . class , int . class , int .class ),
9696 false );
9797
98- public static CallSite bootstrapStrings (MethodHandles .Lookup lookup , String name , MethodType type , String begin , String beginEnc , int beginCR , String end , String endEnc , int endCR , int exclusive ) {
99- return new StringRangeObjectSite (type , StringBootstrap .bytelist (begin , beginEnc ), beginCR , StringBootstrap .bytelist (end , endEnc ), endCR , exclusive != 0 ).bootstrap (lookup );
98+ public static CallSite bootstrapStrings (MethodHandles .Lookup lookup , String name , MethodType type , String begin , String beginEnc , int beginCR , String end , String endEnc , int endCR , String file , int beginLine , int endLine , int exclusive ) {
99+ return new StringRangeObjectSite (type , StringBootstrap .bytelist (begin , beginEnc ), beginCR , StringBootstrap .bytelist (end , endEnc ), endCR , file , beginLine , endLine , exclusive != 0 ).bootstrap (lookup );
100100 }
101101
102102 public static class StringRangeObjectSite extends RangeObjectSite {
103103 protected final ByteList begin ;
104104 protected final int beginCR ;
105105 protected final ByteList end ;
106106 protected final int endCR ;
107+ protected final String file ;
108+ protected final int beginLine ;
109+ protected final int endLine ;
107110
108- public StringRangeObjectSite (MethodType type , ByteList begin , int beginCR , ByteList end , int endCR , boolean exclusive ) {
111+ public StringRangeObjectSite (MethodType type , ByteList begin , int beginCR , ByteList end , int endCR , String file , int beginLine , int endLine , boolean exclusive ) {
109112 super (type , exclusive );
110113
111114 this .begin = begin ;
112115 this .beginCR = beginCR ;
113116 this .end = end ;
114117 this .endCR = endCR ;
118+ this .file = file ;
119+ this .beginLine = beginLine ;
120+ this .endLine = endLine ;
115121 }
116122
117123 public IRubyObject construct (ThreadContext context ) throws Throwable {
118124 return RubyRange .newRange (
119125 context ,
120- IRRuntimeHelpers .newFrozenString (context , begin , beginCR ),
121- IRRuntimeHelpers .newFrozenString (context , end , endCR ),
126+ IRRuntimeHelpers .newFrozenString (context , begin , beginCR , file , beginLine ),
127+ IRRuntimeHelpers .newFrozenString (context , end , endCR , file , endLine ),
122128 exclusive );
123129 }
124130 }
0 commit comments