From b6b2e489f10bfc771beae8fa0ee5237613acd18f Mon Sep 17 00:00:00 2001 From: manga_osyo Date: Mon, 6 Dec 2021 08:57:56 +0900 Subject: [ruby/irb] Changed to call Kernel.print If you call `binding.irb` on a class defined `#print`, it will crash, so call `Kernel.print`. Fix [Bug #18389] `binding.irb` can fail in some classes that implement `context` and `print` methods. https://github.com/ruby/irb/commit/d54b271984 --- lib/irb/extend-command.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/irb/extend-command.rb') diff --git a/lib/irb/extend-command.rb b/lib/irb/extend-command.rb index d6fb19038d..7778a0d0ce 100644 --- a/lib/irb/extend-command.rb +++ b/lib/irb/extend-command.rb @@ -235,7 +235,7 @@ module IRB # :nodoc: alias_method to, from } else - print "irb: warn: can't alias #{to} from #{from}.\n" + Kernel.print "irb: warn: can't alias #{to} from #{from}.\n" end end -- cgit v1.2.1