@@ -1223,40 +1223,6 @@ format_errors(VALUE self, VALUE source, VALUE colorize) {
1223
1223
return result ;
1224
1224
}
1225
1225
1226
- /**
1227
- * call-seq:
1228
- * Debug::static_inspect(source) -> String
1229
- *
1230
- * Inspect the node as it would be inspected by the warnings used in static
1231
- * literal sets.
1232
- */
1233
- static VALUE
1234
- static_inspect (int argc , VALUE * argv , VALUE self ) {
1235
- pm_string_t input ;
1236
- pm_options_t options = { 0 };
1237
- string_options (argc , argv , & input , & options );
1238
-
1239
- pm_parser_t parser ;
1240
- pm_parser_init (& parser , pm_string_source (& input ), pm_string_length (& input ), & options );
1241
-
1242
- pm_node_t * program = pm_parse (& parser );
1243
- pm_node_t * node = ((pm_program_node_t * ) program )-> statements -> body .nodes [0 ];
1244
-
1245
- pm_buffer_t buffer = { 0 };
1246
- pm_static_literal_inspect (& buffer , & parser .newline_list , parser .start_line , parser .encoding -> name , node );
1247
-
1248
- rb_encoding * encoding = rb_enc_find (parser .encoding -> name );
1249
- VALUE result = rb_enc_str_new (pm_buffer_value (& buffer ), pm_buffer_length (& buffer ), encoding );
1250
-
1251
- pm_buffer_free (& buffer );
1252
- pm_node_destroy (& parser , program );
1253
- pm_parser_free (& parser );
1254
- pm_string_free (& input );
1255
- pm_options_free (& options );
1256
-
1257
- return result ;
1258
- }
1259
-
1260
1226
/**
1261
1227
* call-seq: Debug::Encoding.all -> Array[Debug::Encoding]
1262
1228
*
@@ -1414,7 +1380,6 @@ Init_prism(void) {
1414
1380
rb_define_singleton_method (rb_cPrismDebug , "memsize" , memsize , 1 );
1415
1381
rb_define_singleton_method (rb_cPrismDebug , "profile_file" , profile_file , 1 );
1416
1382
rb_define_singleton_method (rb_cPrismDebug , "format_errors" , format_errors , 2 );
1417
- rb_define_singleton_method (rb_cPrismDebug , "static_inspect" , static_inspect , -1 );
1418
1383
1419
1384
#ifndef PRISM_EXCLUDE_PRETTYPRINT
1420
1385
rb_define_singleton_method (rb_cPrismDebug , "inspect_node" , inspect_node , 1 );
0 commit comments