By this change the following code prints only one warning. Only the changes are as follows. See the article separation of positional and keyword arguments in ruby 3 0 in detail.