@@ -1289,8 +1289,8 @@ static IRubyObject[] str_to_c_internal(ThreadContext context, RubyString str) {
12891289
12901290 if (m != nil ) {
12911291 RubyMatchData match = (RubyMatchData )m ;
1292- sr = match .at (1 );
1293- si = match .at (2 );
1292+ sr = match .at (context , 1 );
1293+ si = match .at (context , 2 );
12941294 re = match .post_match (context );
12951295 po = true ;
12961296 }
@@ -1301,9 +1301,9 @@ static IRubyObject[] str_to_c_internal(ThreadContext context, RubyString str) {
13011301 if (m != nil ) {
13021302 RubyMatchData match = (RubyMatchData )m ;
13031303 sr = nil ;
1304- si = match .at (1 );
1304+ si = match .at (context , 1 );
13051305 if (si == nil ) si = runtime .newString ();
1306- IRubyObject t = match .at (2 );
1306+ IRubyObject t = match .at (context , 2 );
13071307 if (t == nil ) t = runtime .newString (RubyInteger .singleCharByteList ((byte ) '1' ));
13081308 ((RubyString ) (si = si .convertToString ())).cat (t .convertToString ());
13091309 re = match .post_match (context );
@@ -1315,12 +1315,12 @@ static IRubyObject[] str_to_c_internal(ThreadContext context, RubyString str) {
13151315 m = RubyRegexp .newDummyRegexp (runtime , Numeric .ComplexPatterns .comp_pat2 ).match_m (context , str , false );
13161316 if (m == nil ) return new IRubyObject [] { context .nil , str };
13171317 RubyMatchData match = (RubyMatchData ) m ;
1318- sr = match .at (1 );
1319- if (match .at (2 ) == nil ) {
1318+ sr = match .at (context , 1 );
1319+ if (match .at (context , 2 ) == nil ) {
13201320 si = context .nil ;
13211321 } else {
1322- si = match .at (3 );
1323- IRubyObject t = match .at (4 );
1322+ si = match .at (context , 3 );
1323+ IRubyObject t = match .at (context , 4 );
13241324 if (t == nil ) t = runtime .newString (RubyInteger .singleCharByteList ((byte ) '1' ));
13251325 ((RubyString ) (si = si .convertToString ())).cat (t .convertToString ());
13261326 }
0 commit comments