mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-09-08 19:29:56 +00:00
Handle yaml.load in a way that is ruby version agnostic.
This commit is contained in:
+5
-1
@@ -108,7 +108,11 @@ class CMockConfig
|
||||
def self.load_config_file_from_yaml(yaml_filename)
|
||||
require 'yaml'
|
||||
require 'fileutils'
|
||||
YAML.load_file(yaml_filename)[:cmock]
|
||||
begin
|
||||
return YAML.load_file(yaml_filename, aliases: true)[:cmock]
|
||||
rescue ArgumentError
|
||||
return YAML.load_file(yaml_filename)[:cmock]
|
||||
end
|
||||
end
|
||||
|
||||
def path(new_path)
|
||||
|
||||
Reference in New Issue
Block a user