[ruby/io-console] Get rid of address of an rvalue on TruffleRuby

https://github.com/ruby/io-console/commit/653c1cd33f
This commit is contained in:
Nobuyoshi Nakada 2023-08-18 12:46:43 +09:00 committed by git
parent 818ba30ee9
commit 412defc7ad

View File

@ -1564,7 +1564,8 @@ static VALUE
str_chomp(VALUE str)
{
if (!NIL_P(str)) {
rb_funcallv(str, id_chomp_bang, 1, &rb_default_rs);
const VALUE rs = rb_default_rs; /* rvalue in TruffleRuby */
rb_funcallv(str, id_chomp_bang, 1, &rs);
}
return str;
}