ruby-changes:55935
From: Nobuyoshi <ko1@a...>
Date: Fri, 31 May 2019 16:32:50 +0900 (JST)
Subject: [ruby-changes:55935] Nobuyoshi Nakada: 8b39df854d (trunk): Let irb use an empty file as irbrc
https://git.ruby-lang.org/ruby.git/commit/?id=8b39df854d From 8b39df854d7dea1c15949c6b047bcb0f0a12c287 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Fri, 31 May 2019 16:31:22 +0900 Subject: Let irb use an empty file as irbrc to get rid of side-effect by existing .irbrc file. diff --git a/spec/ruby/core/binding/fixtures/irbrc b/spec/ruby/core/binding/fixtures/irbrc new file mode 100644 index 0000000..2bc12af --- /dev/null +++ b/spec/ruby/core/binding/fixtures/irbrc @@ -0,0 +1 @@ +# empty configuration diff --git a/spec/ruby/core/binding/irb_spec.rb b/spec/ruby/core/binding/irb_spec.rb index dd3df0b..bd37b41 100644 --- a/spec/ruby/core/binding/irb_spec.rb +++ b/spec/ruby/core/binding/irb_spec.rb @@ -4,8 +4,9 @@ ruby_version_is "2.5" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/binding/irb_spec.rb#L4 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) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/