Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since psych4.0, the load method has been safe_load, which causes the following error: YAML#load_dj retains the existing safeYAML support, but uses the version of psych that implements unsafe_load. In YAML#load_dj ``` 1) YAML autoloads the class of an anonymous struct Failure/Error: expect do yaml = "--- !ruby/struct\nn: 1\n" object = YAML.load(yaml) expect(object).to be_kind_of(Struct) expect(object.n).to eq(1) end.not_to raise_error expected no Exception, got #<Psych::DisallowedClass: Tried to load unspecified class: Struct> with backtrace: # (eval):2:in `struct' # ./spec/yaml_ext_spec.rb:28:in `block (3 levels) in <top (required)>' # ./spec/yaml_ext_spec.rb:26:in `block (2 levels) in <top (required)>' # ./spec/yaml_ext_spec.rb:26:in `block (2 levels) in <top (required)>' ```
- Loading branch information