From aaf36f4f8eb585ef598aa9f2d973adf92a868de3 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Wed, 8 Jan 2025 10:48:48 +0900 Subject: [PATCH] Use heredoc to script runner for another ruby process --- spec/bundled_gems_spec.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spec/bundled_gems_spec.rb b/spec/bundled_gems_spec.rb index 77eb9c6380..3f1982adf8 100644 --- a/spec/bundled_gems_spec.rb +++ b/spec/bundled_gems_spec.rb @@ -58,7 +58,12 @@ end RSpec.describe "bundled_gems.rb" do def script(code, options = {}) options[:artifice] ||= "compact_index" - ruby("require 'bundler/inline'\n\n" + code, options) + code = <<~RUBY + require 'bundler/inline' + + #{code} + RUBY + ruby(code, options) end it "Show warning require and LoadError" do