13
13
import java .util .function .Function ;
14
14
15
15
import com .oracle .truffle .api .CompilerDirectives ;
16
- import com .oracle .truffle .api .source .SourceSection ;
17
16
import org .truffleruby .RubyContext ;
18
17
import org .truffleruby .RubyLanguage ;
19
18
import org .truffleruby .collections .CachedSupplier ;
19
+ import org .truffleruby .core .CoreLibrary ;
20
20
import org .truffleruby .core .array .ArrayUtils ;
21
21
import org .truffleruby .core .cast .TaintResultNode ;
22
22
import org .truffleruby .core .klass .RubyClass ;
@@ -208,7 +208,7 @@ private static void addMethod(
208
208
final LexicalScope lexicalScope = new LexicalScope (context .getRootLexicalScope (), module );
209
209
210
210
for (String name : names ) {
211
- final SharedMethodInfo sharedMethodInfo = makeSharedMethodInfo (context , lexicalScope , module , name , arity );
211
+ final SharedMethodInfo sharedMethodInfo = makeSharedMethodInfo (lexicalScope , module , name , arity );
212
212
213
213
module .fields .addMethod (context , null , new InternalMethod (
214
214
context ,
@@ -223,10 +223,9 @@ private static void addMethod(
223
223
}
224
224
}
225
225
226
- private static SharedMethodInfo makeSharedMethodInfo (RubyContext context , LexicalScope lexicalScope ,
227
- RubyModule module , String name , Arity arity ) {
228
- final SourceSection sourceSection = context .getCoreLibrary ().sourceSection ;
229
- return new SharedMethodInfo (sourceSection , lexicalScope , arity , module , name , 0 , "builtin" , null );
226
+ private static SharedMethodInfo makeSharedMethodInfo (LexicalScope lexicalScope , RubyModule module , String name ,
227
+ Arity arity ) {
228
+ return new SharedMethodInfo (CoreLibrary .SOURCE_SECTION , lexicalScope , arity , module , name , 0 , "builtin" , null );
230
229
}
231
230
232
231
private static Arity createArity (int required , int optional , boolean rest , String keywordAsOptional ) {
0 commit comments