summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Lo <[email protected]>2024-05-02 18:50:39 +0100
committerPeter Zhu <[email protected]>2024-05-02 14:33:30 -0400
commitc681af3e5d36fb36c76e05b5d822131f28ed9de7 (patch)
tree718b4e7338d375f14a725052bbeac1807dd7e80b
parent945a99e81a2b4910a106e932c620abac75717cb1 (diff)
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.
-rw-r--r--spec/ruby/core/binding/irb_spec.rb2
1 files changed, 1 insertions, 1 deletions
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