Skip to content

Commit

Permalink
[ruby/irb] Use Kernel.warn to print command alias warning
Browse files Browse the repository at this point in the history
(ruby/irb#601)

This aligns with other warnings in irb and properly channel the message
to stderr.
  • Loading branch information
st0012 authored and matzbot committed Jun 10, 2023
1 parent be86767 commit e1ccb28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/irb/extend-command.rb
Expand Up @@ -289,7 +289,7 @@ def install_alias_method(to, from, override = NO_OVERRIDE)
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

Expand Down

0 comments on commit e1ccb28

Please sign in to comment.