summaryrefslogtreecommitdiff
path: root/spec/mspec
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-05-17 13:36:55 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-05-17 13:36:55 +0900
commita0e97b0e2e4314a0815d09beb825e38f234778da (patch)
tree0c55d7b50efeb8daaee6dd469de30b7a7effcf80 /spec/mspec
parentdfecc650c3f9bbd8b4fb0eefc1e3da65f151d3a8 (diff)
Use YAML.unsafe_load instead of YAML.load.
This is a temporary workaround. We should rewrite the examples with permitted_classes.
Diffstat (limited to 'spec/mspec')
-rw-r--r--spec/mspec/lib/mspec/matchers/match_yaml.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/mspec/lib/mspec/matchers/match_yaml.rb b/spec/mspec/lib/mspec/matchers/match_yaml.rb
index 920d85a14f..614020e550 100644
--- a/spec/mspec/lib/mspec/matchers/match_yaml.rb
+++ b/spec/mspec/lib/mspec/matchers/match_yaml.rb
@@ -30,7 +30,7 @@ class MatchYAMLMatcher
def valid_yaml?(obj)
require 'yaml'
begin
- YAML.load(obj)
+ YAML.unsafe_load(obj)
rescue
false
else