diff options
author | manga_osyo <manga.osyo@gmail.com> | 2021-12-06 08:57:56 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-01-27 01:28:52 +0900 |
commit | b6b2e489f10bfc771beae8fa0ee5237613acd18f (patch) | |
tree | 10a661ecf763a3d42f0cd34ba8c98f57291844e6 /lib/irb/extend-command.rb | |
parent | e7141630115ef9b0d3042af761fe0afabfcd578c (diff) | |
download | ruby-b6b2e489f10bfc771beae8fa0ee5237613acd18f.tar.gz |
[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
Diffstat (limited to 'lib/irb/extend-command.rb')
-rw-r--r-- | lib/irb/extend-command.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |