From a3d578bc1e876f82ea07b2f3a9a5dc3147850d78 Mon Sep 17 00:00:00 2001 From: Rohan Tambat Date: Tue, 13 Jan 2026 16:17:17 +0530 Subject: [PATCH] Potential fix for code scanning alert no. 3: Use of `Kernel.open` or `IO.read` or similar sinks with a non-constant value Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- test/cases/migration_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cases/migration_test.rb b/test/cases/migration_test.rb index ed080b2..e712a68 100644 --- a/test/cases/migration_test.rb +++ b/test/cases/migration_test.rb @@ -665,7 +665,7 @@ def test_copying_migrations_without_timestamps assert_equal [@migrations_path + "/4_people_have_hobbies.bukkits.rb", @migrations_path + "/5_people_have_descriptions.bukkits.rb"], copied.map(&:filename) expected = "# This migration comes from bukkits (originally 1)" - assert_equal expected, IO.readlines(@migrations_path + "/4_people_have_hobbies.bukkits.rb")[0].chomp + assert_equal expected, File.readlines(@migrations_path + "/4_people_have_hobbies.bukkits.rb")[0].chomp files_count = Dir[@migrations_path + "/*.rb"].length copied = ActiveRecord::Migration.copy(@migrations_path, {:bukkits => MIGRATIONS_ROOT + "/to_copy"})