Allow arguments to be passed through Binding#irb (#12796)

* Allow arguments to be passed through Binding#irb

Modified Binding#irb to forward any arguments to the underlying irb
method call.

* Update prelude.rb

Co-authored-by: Stan Lo <stan001212@gmail.com>

* Update prelude.rb

Co-authored-by: Stan Lo <stan001212@gmail.com>

---------

Co-authored-by: Stan Lo <stan001212@gmail.com>
This commit is contained in:
Hiroaki Osawa 2025-03-18 02:19:43 +09:00 committed by GitHub
parent 1acfb29015
commit 52f6563422
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
Notes: git 2025-03-17 17:20:02 +00:00
Merged-By: tompng <tomoyapenguin@gmail.com>

View File

@ -1,13 +1,13 @@
class Binding
# :nodoc:
def irb
def irb(...)
begin
require 'irb'
rescue LoadError, Gem::LoadError
Gem::BUNDLED_GEMS.force_activate 'irb'
retry
end
irb
irb(...)
end
# suppress redefinition warning