Permalink
Browse files

Autoload YAML and StringScanner for JSON decoding

  • Loading branch information...
1 parent 2c5c271 commit f40eb52566b27184623dcac5cca8d6831a8e5de5 @jeremy jeremy committed Apr 18, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 activesupport/lib/active_support/json/decoding.rb
@@ -1,5 +1,5 @@
-require 'yaml'
-require 'strscan'
+autoload :YAML, 'yaml' unless defined? YAML
+autoload :StringScanner, 'strscan' unless defined? StringScanner
require 'active_support/core_ext/string/starts_ends_with'

0 comments on commit f40eb52

Please sign in to comment.