Skip to content

Commit d54b271

Browse files
osyo-mangajeremyevans
authored andcommitted
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.
1 parent 99d3aa9 commit d54b271

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/irb/extend-command.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def install_alias_method(to, from, override = NO_OVERRIDE)
235235
alias_method to, from
236236
}
237237
else
238-
print "irb: warn: can't alias #{to} from #{from}.\n"
238+
Kernel.print "irb: warn: can't alias #{to} from #{from}.\n"
239239
end
240240
end
241241

0 commit comments

Comments
 (0)