1
0
mirror of https://github.com/ThrowTheSwitch/Unity.git synced 2026-01-23 00:15:58 +01:00

Fix broken YAML parsing on later Rubies with Psych >=4.0

YAML.load is now interpreted as YAML.safe_load, which breaks where the
YAML file contains aliases. If we can assume our yaml files are
trusted (since this a development tool), we can check for the presence
of YAML.unsafe_load and use it instead if it exists.
This commit is contained in:
Martyn Jago
2022-05-27 15:08:11 +01:00
parent e54c9787b7
commit b44c2dd095
6 changed files with 37 additions and 12 deletions

View File

@@ -1,14 +1,19 @@
require 'yaml'
# ==========================================
# Unity Project - A Test Framework for C
# Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
# [Released under MIT License. Please refer to license.txt for details]
# ==========================================
require 'fileutils'
require_relative '../../auto/unity_test_summary'
require_relative '../../auto/generate_test_runner'
require_relative '../../auto/colour_reporter'
require_relative '../../auto/yaml_helper'
C_EXTENSION = '.c'.freeze
def load_configuration(config_file)
$cfg_file = config_file
$cfg = YAML.load(File.read($cfg_file))
$cfg = YamlHelper.load_file($cfg_file)
end
def configure_clean