aboutsummaryrefslogtreecommitdiffstats
path: root/io.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-17 17:17:07 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2019-12-19 09:52:17 +0900
commitc6c67254fb17b3196a7b0d3fda4650f6b20a467d (patch)
tree8991858d6822ea27d9bc492080d2af00236c5ea5 /io.c
parent7aa8a786740fd84bd718b0c055f190b25a8f0277 (diff)
downloadruby-c6c67254fb17b3196a7b0d3fda4650f6b20a467d.tar.gz
Added rb_warn_deprecated
Diffstat (limited to 'io.c')
-rw-r--r--io.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/io.c b/io.c
index eaaccbbe07..caef68c769 100644
--- a/io.c
+++ b/io.c
@@ -3810,7 +3810,7 @@ rb_io_each_line(int argc, VALUE *argv, VALUE io)
static VALUE
rb_io_lines(int argc, VALUE *argv, VALUE io)
{
- rb_warn("IO#lines is deprecated; use #each_line instead");
+ rb_warn_deprecated("IO#lines", "#each_line");
if (!rb_block_given_p())
return rb_enumeratorize(io, ID2SYM(rb_intern("each_line")), argc, argv);
return rb_io_each_line(argc, argv, io);
@@ -3861,7 +3861,7 @@ rb_io_each_byte(VALUE io)
static VALUE
rb_io_bytes(VALUE io)
{
- rb_warn("IO#bytes is deprecated; use #each_byte instead");
+ rb_warn_deprecated("IO#bytes", "#each_byte");
if (!rb_block_given_p())
return rb_enumeratorize(io, ID2SYM(rb_intern("each_byte")), 0, 0);
return rb_io_each_byte(io);
@@ -4015,7 +4015,7 @@ rb_io_each_char(VALUE io)
static VALUE
rb_io_chars(VALUE io)
{
- rb_warn("IO#chars is deprecated; use #each_char instead");
+ rb_warn_deprecated("IO#chars", "#each_char");
if (!rb_block_given_p())
return rb_enumeratorize(io, ID2SYM(rb_intern("each_char")), 0, 0);
return rb_io_each_char(io);
@@ -4143,7 +4143,7 @@ rb_io_each_codepoint(VALUE io)
static VALUE
rb_io_codepoints(VALUE io)
{
- rb_warn("IO#codepoints is deprecated; use #each_codepoint instead");
+ rb_warn_deprecated("IO#codepoints", "#each_codepoint");
if (!rb_block_given_p())
return rb_enumeratorize(io, ID2SYM(rb_intern("each_codepoint")), 0, 0);
return rb_io_each_codepoint(io);
@@ -12479,7 +12479,7 @@ argf_each_line(int argc, VALUE *argv, VALUE argf)
static VALUE
argf_lines(int argc, VALUE *argv, VALUE argf)
{
- rb_warn("ARGF#lines is deprecated; use #each_line instead");
+ rb_warn_deprecated("ARGF#lines", "#each_line");
if (!rb_block_given_p())
return rb_enumeratorize(argf, ID2SYM(rb_intern("each_line")), argc, argv);
return argf_each_line(argc, argv, argf);
@@ -12526,7 +12526,7 @@ argf_each_byte(VALUE argf)
static VALUE
argf_bytes(VALUE argf)
{
- rb_warn("ARGF#bytes is deprecated; use #each_byte instead");
+ rb_warn_deprecated("ARGF#bytes", "#each_byte");
if (!rb_block_given_p())
return rb_enumeratorize(argf, ID2SYM(rb_intern("each_byte")), 0, 0);
return argf_each_byte(argf);
@@ -12565,7 +12565,7 @@ argf_each_char(VALUE argf)
static VALUE
argf_chars(VALUE argf)
{
- rb_warn("ARGF#chars is deprecated; use #each_char instead");
+ rb_warn_deprecated("ARGF#chars", "#each_char");
if (!rb_block_given_p())
return rb_enumeratorize(argf, ID2SYM(rb_intern("each_char")), 0, 0);
return argf_each_char(argf);
@@ -12604,7 +12604,7 @@ argf_each_codepoint(VALUE argf)
static VALUE
argf_codepoints(VALUE argf)
{
- rb_warn("ARGF#codepoints is deprecated; use #each_codepoint instead");
+ rb_warn_deprecated("ARGF#codepoints", "#each_codepoint");
if (!rb_block_given_p())
return rb_enumeratorize(argf, ID2SYM(rb_intern("each_codepoint")), 0, 0);
return argf_each_codepoint(argf);