aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2018-02-21 16:34:39 -0500
committereileencodes <eileencodes@gmail.com>2018-02-21 16:34:39 -0500
commit63d530c5e68a8cf53603744789f53ccbc7ac1a0e (patch)
tree2b4edcdc3ac5c8d7c95b451a25d8111791c054bc /activesupport
parent16f279ebd474626577ced858e3626ac4535a33df (diff)
downloadrails-63d530c5e68a8cf53603744789f53ccbc7ac1a0e.tar.gz
rails-63d530c5e68a8cf53603744789f53ccbc7ac1a0e.tar.bz2
rails-63d530c5e68a8cf53603744789f53ccbc7ac1a0e.zip
Call `YAML.load` correctly
We should call methods with `.method_name` not `::method_name`. Fix two instances of `YAML::load` I found in favor of `YAML.load`.
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/xml_mini.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/xml_mini.rb b/activesupport/lib/active_support/xml_mini.rb
index d0659aeaae..e42eee07a3 100644
--- a/activesupport/lib/active_support/xml_mini.rb
+++ b/activesupport/lib/active_support/xml_mini.rb
@@ -79,7 +79,7 @@ module ActiveSupport
end,
"boolean" => Proc.new { |boolean| %w(1 true).include?(boolean.to_s.strip) },
"string" => Proc.new { |string| string.to_s },
- "yaml" => Proc.new { |yaml| YAML::load(yaml) rescue yaml },
+ "yaml" => Proc.new { |yaml| YAML.load(yaml) rescue yaml },
"base64Binary" => Proc.new { |bin| ::Base64.decode64(bin) },
"binary" => Proc.new { |bin, entity| _parse_binary(bin, entity) },
"file" => Proc.new { |file, entity| _parse_file(file, entity) }