@@ -832,18 +832,6 @@ strio_each_byte(VALUE self)
832
832
return self ;
833
833
}
834
834
835
- /*
836
- * This is a deprecated alias for #each_byte.
837
- */
838
- static VALUE
839
- strio_bytes (VALUE self )
840
- {
841
- rb_warn ("StringIO#bytes is deprecated; use #each_byte instead" );
842
- if (!rb_block_given_p ())
843
- return rb_enumeratorize (self , ID2SYM (rb_intern ("each_byte" )), 0 , 0 );
844
- return strio_each_byte (self );
845
- }
846
-
847
835
/*
848
836
* call-seq:
849
837
* strio.getc -> string or nil
@@ -1057,18 +1045,6 @@ strio_each_char(VALUE self)
1057
1045
return self ;
1058
1046
}
1059
1047
1060
- /*
1061
- * This is a deprecated alias for #each_char.
1062
- */
1063
- static VALUE
1064
- strio_chars (VALUE self )
1065
- {
1066
- rb_warn ("StringIO#chars is deprecated; use #each_char instead" );
1067
- if (!rb_block_given_p ())
1068
- return rb_enumeratorize (self , ID2SYM (rb_intern ("each_char" )), 0 , 0 );
1069
- return strio_each_char (self );
1070
- }
1071
-
1072
1048
/*
1073
1049
* call-seq:
1074
1050
* strio.each_codepoint {|c| block } -> strio
@@ -1101,18 +1077,6 @@ strio_each_codepoint(VALUE self)
1101
1077
return self ;
1102
1078
}
1103
1079
1104
- /*
1105
- * This is a deprecated alias for #each_codepoint.
1106
- */
1107
- static VALUE
1108
- strio_codepoints (VALUE self )
1109
- {
1110
- rb_warn ("StringIO#codepoints is deprecated; use #each_codepoint instead" );
1111
- if (!rb_block_given_p ())
1112
- return rb_enumeratorize (self , ID2SYM (rb_intern ("each_codepoint" )), 0 , 0 );
1113
- return strio_each_codepoint (self );
1114
- }
1115
-
1116
1080
/* Boyer-Moore search: copied from regex.c */
1117
1081
static void
1118
1082
bm_init_skip (long * skip , const char * pat , long m )
@@ -1363,18 +1327,6 @@ strio_each(int argc, VALUE *argv, VALUE self)
1363
1327
return self ;
1364
1328
}
1365
1329
1366
- /*
1367
- * This is a deprecated alias for #each_line.
1368
- */
1369
- static VALUE
1370
- strio_lines (int argc , VALUE * argv , VALUE self )
1371
- {
1372
- rb_warn ("StringIO#lines is deprecated; use #each_line instead" );
1373
- if (!rb_block_given_p ())
1374
- return rb_enumeratorize (self , ID2SYM (rb_intern ("each_line" )), argc , argv );
1375
- return strio_each (argc , argv , self );
1376
- }
1377
-
1378
1330
/*
1379
1331
* call-seq:
1380
1332
* strio.readlines(sep=$/, chomp: false) -> array
@@ -1843,13 +1795,9 @@ Init_stringio(void)
1843
1795
1844
1796
rb_define_method (StringIO , "each" , strio_each , -1 );
1845
1797
rb_define_method (StringIO , "each_line" , strio_each , -1 );
1846
- rb_define_method (StringIO , "lines" , strio_lines , -1 );
1847
1798
rb_define_method (StringIO , "each_byte" , strio_each_byte , 0 );
1848
- rb_define_method (StringIO , "bytes" , strio_bytes , 0 );
1849
1799
rb_define_method (StringIO , "each_char" , strio_each_char , 0 );
1850
- rb_define_method (StringIO , "chars" , strio_chars , 0 );
1851
1800
rb_define_method (StringIO , "each_codepoint" , strio_each_codepoint , 0 );
1852
- rb_define_method (StringIO , "codepoints" , strio_codepoints , 0 );
1853
1801
rb_define_method (StringIO , "getc" , strio_getc , 0 );
1854
1802
rb_define_method (StringIO , "ungetc" , strio_ungetc , 1 );
1855
1803
rb_define_method (StringIO , "ungetbyte" , strio_ungetbyte , 1 );
0 commit comments