@@ -832,18 +832,6 @@ strio_each_byte(VALUE self)
832832 return self ;
833833}
834834
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-
847835/*
848836 * call-seq:
849837 * strio.getc -> string or nil
@@ -1057,18 +1045,6 @@ strio_each_char(VALUE self)
10571045 return self ;
10581046}
10591047
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-
10721048/*
10731049 * call-seq:
10741050 * strio.each_codepoint {|c| block } -> strio
@@ -1101,18 +1077,6 @@ strio_each_codepoint(VALUE self)
11011077 return self ;
11021078}
11031079
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-
11161080/* Boyer-Moore search: copied from regex.c */
11171081static void
11181082bm_init_skip (long * skip , const char * pat , long m )
@@ -1363,18 +1327,6 @@ strio_each(int argc, VALUE *argv, VALUE self)
13631327 return self ;
13641328}
13651329
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-
13781330/*
13791331 * call-seq:
13801332 * strio.readlines(sep=$/, chomp: false) -> array
@@ -1843,13 +1795,9 @@ Init_stringio(void)
18431795
18441796 rb_define_method (StringIO , "each" , strio_each , -1 );
18451797 rb_define_method (StringIO , "each_line" , strio_each , -1 );
1846- rb_define_method (StringIO , "lines" , strio_lines , -1 );
18471798 rb_define_method (StringIO , "each_byte" , strio_each_byte , 0 );
1848- rb_define_method (StringIO , "bytes" , strio_bytes , 0 );
18491799 rb_define_method (StringIO , "each_char" , strio_each_char , 0 );
1850- rb_define_method (StringIO , "chars" , strio_chars , 0 );
18511800 rb_define_method (StringIO , "each_codepoint" , strio_each_codepoint , 0 );
1852- rb_define_method (StringIO , "codepoints" , strio_codepoints , 0 );
18531801 rb_define_method (StringIO , "getc" , strio_getc , 0 );
18541802 rb_define_method (StringIO , "ungetc" , strio_ungetc , 1 );
18551803 rb_define_method (StringIO , "ungetbyte" , strio_ungetbyte , 1 );
0 commit comments