Skip to content

Commit cfe908c

Browse files
nobueregon
authored andcommitted
Let irb use an empty file as irbrc
to get rid of side-effect by existing .irbrc file.
1 parent 245d4d0 commit cfe908c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

core/binding/fixtures/irbrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# empty configuration

core/binding/irb_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
describe "Binding#irb" do
55
it "creates an IRB session with the binding in scope" do
66
irb_fixture = fixture __FILE__, "irb.rb"
7+
irbrc_fixture = fixture __FILE__, "irbrc"
78

8-
out = IO.popen([*ruby_exe, irb_fixture], "r+") do |pipe|
9+
out = IO.popen([{"IRBRC"=>irbrc_fixture}, *ruby_exe, irb_fixture], "r+") do |pipe|
910
pipe.puts "a ** 2"
1011
pipe.puts "exit"
1112
pipe.readlines.map(&:chomp)

0 commit comments

Comments
 (0)