From c681af3e5d36fb36c76e05b5d822131f28ed9de7 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Thu, 2 May 2024 18:50:39 +0100 Subject: [PATCH] Reject empty lines in IRB binding spec For that particular spec, the empty lines' presence is not relevant. So let's remove them to make the spec easier to maintain. --- spec/ruby/core/binding/irb_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/ruby/core/binding/irb_spec.rb b/spec/ruby/core/binding/irb_spec.rb index 25521f0dd7..2607c7ef33 100644 --- a/spec/ruby/core/binding/irb_spec.rb +++ b/spec/ruby/core/binding/irb_spec.rb @@ -10,7 +10,7 @@ describe "Binding#irb" do IO.popen([envs, *ruby_exe, irb_fixture, chdir: dir], "r+") do |pipe| pipe.puts "a ** 2" pipe.puts "exit" - pipe.readlines.map(&:chomp) + pipe.readlines.map(&:chomp).reject(&:empty?) end end