1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Let irb use an empty file as irbrc

to get rid of side-effect by existing .irbrc file.
This commit is contained in:
Nobuyoshi Nakada 2019-05-31 16:31:22 +09:00
parent b632566d33
commit 8b39df854d
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1 @@
# empty configuration

View file

@ -4,8 +4,9 @@ ruby_version_is "2.5" do
describe "Binding#irb" do
it "creates an IRB session with the binding in scope" do
irb_fixture = fixture __FILE__, "irb.rb"
irbrc_fixture = fixture __FILE__, "irbrc"
out = IO.popen([*ruby_exe, irb_fixture], "r+") do |pipe|
out = IO.popen([{"IRBRC"=>irbrc_fixture}, *ruby_exe, irb_fixture], "r+") do |pipe|
pipe.puts "a ** 2"
pipe.puts "exit"
pipe.readlines.map(&:chomp)