[ruby/irb] Use Kernel.warn to print command alias warning

(https://github.com/ruby/irb/pull/601)

This aligns with other warnings in irb and properly channel the message
to stderr.
This commit is contained in:
Stan Lo 2023-06-10 16:01:41 +01:00 committed by git
parent be86767eef
commit e1ccb2838b

View File

@ -289,7 +289,7 @@ module IRB # :nodoc:
alias_method to, from
}
else
Kernel.print "irb: warn: can't alias #{to} from #{from}.\n"
Kernel.warn "irb: warn: can't alias #{to} from #{from}.\n"
end
end