summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2023-08-18 12:19:25 +0900
committergit <svn-admin@ruby-lang.org>2023-08-18 03:55:04 +0000
commit818ba30ee9e188c59385a56bc7560f43e90bce94 (patch)
tree5a87a6d1aa24eb4cdff1d95a69a79079470c961c /ext
parentcff8058701641c680de4924ea98d1b9d0efd9244 (diff)
[ruby/io-console] Avoid the influence of special variable `$/`
https://github.com/ruby/io-console/commit/5f71354332
Diffstat (limited to 'ext')
-rw-r--r--ext/io/console/console.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/io/console/console.c b/ext/io/console/console.c
index dd15c8b015..b24ac74f27 100644
--- a/ext/io/console/console.c
+++ b/ext/io/console/console.c
@@ -1564,7 +1564,7 @@ static VALUE
str_chomp(VALUE str)
{
if (!NIL_P(str)) {
- rb_funcallv(str, id_chomp_bang, 0, 0);
+ rb_funcallv(str, id_chomp_bang, 1, &rb_default_rs);
}
return str;
}