summaryrefslogtreecommitdiff
path: root/spec/fixtures
diff options
context:
space:
mode:
authorDaniel Doubrovkine (dB.) @dblockdotorg <dblock@dblock.org>2019-03-22 15:04:22 -0400
committerMichael Herold <github@michaeljherold.com>2019-03-22 14:04:22 -0500
commit30ab2a3cb01fe9d0fc2def77868d7996ce4e873e (patch)
treefe8207b64cc7016844b94e9f01ae27740f540fbe /spec/fixtures
parentdc64b1024cca1916e49b12902c82c3e1560fef39 (diff)
downloadhashie-30ab2a3cb01fe9d0fc2def77868d7996ce4e873e.tar.gz
Allow options on Mash.load (#474)
`Mash.load` uses the Ruby standard library to load Yaml-serialized files into a Mash. The original implementation used `YAML.load` for this purpose. However, that method is inherently unsafe so we switched to using `YAML.safe_load`. Safely loading Yaml files has many different domain-specific configuration flags that we did not, by default, expose. This change introduces the ability to configure the safe loading of Yaml files so that all types of Yaml can be loaded when necessary using the flags from the standard library. This implementation preserves the backwards-compatibility with the prior implementation so that it should not require updates from users of the current `Mash.load` behavior. For those who this change affects, we included upgrading documentation to ease the transition.
Diffstat (limited to 'spec/fixtures')
-rw-r--r--spec/fixtures/yaml_with_symbols.yml3
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/fixtures/yaml_with_symbols.yml b/spec/fixtures/yaml_with_symbols.yml
new file mode 100644
index 0000000..c761e2b
--- /dev/null
+++ b/spec/fixtures/yaml_with_symbols.yml
@@ -0,0 +1,3 @@
+:user_icon:
+ :width: 200
+ :height: 200