Skip to content

Commit f2b5f58

Browse files
authored
Merge pull request #695 from Shopify/unsafe-load-file
Unconditionally call `YAML.unsafe_load_file`
2 parents f2b6761 + b683be5 commit f2b5f58

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

test/config_test.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ def test_config_is_sorted_alphabetically
7575
def test_no_cops_are_configured_as_pending
7676
pending_cops = []
7777

78-
load_method = YAML.respond_to?(:unsafe_load_file) ? :unsafe_load_file : :load_file
79-
YAML.public_send(load_method, FULL_CONFIG_PATH).each do |cop_name, cop_config|
78+
YAML.unsafe_load_file(FULL_CONFIG_PATH).each do |cop_name, cop_config|
8079
pending_cops << cop_name if Hash === cop_config && cop_config["Enabled"] == "pending"
8180
end
8281

0 commit comments

Comments
 (0)