From e1ccb2838b65f23e7a21bdd416160d03dd73e7f8 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Sat, 10 Jun 2023 16:01:41 +0100 Subject: [PATCH] [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. --- lib/irb/extend-command.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/irb/extend-command.rb b/lib/irb/extend-command.rb index e377148fb4..8b074262ee 100644 --- a/lib/irb/extend-command.rb +++ b/lib/irb/extend-command.rb @@ -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