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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user