diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-06-08 19:29:24 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-06-08 19:37:51 -0700 |
commit | e1f679a020be4dcf2052111bcab833e28e0bc15e (patch) | |
tree | 62ea4a9708518f9853959275cb1981eaa2945f95 /activesupport/lib | |
parent | 6e73cf6bdf0ab3961f212735b4ac46f7e924fcd5 (diff) | |
download | rails-e1f679a020be4dcf2052111bcab833e28e0bc15e.tar.gz rails-e1f679a020be4dcf2052111bcab833e28e0bc15e.tar.bz2 rails-e1f679a020be4dcf2052111bcab833e28e0bc15e.zip |
Simplify json decoder backend lazy load
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/json/decoding.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/json/decoding.rb b/activesupport/lib/active_support/json/decoding.rb index 5d4caa362f..b4e4177724 100644 --- a/activesupport/lib/active_support/json/decoding.rb +++ b/activesupport/lib/active_support/json/decoding.rb @@ -9,10 +9,8 @@ module ActiveSupport delegate :decode, :to => :backend def backend - @backend || begin - self.backend = "Yaml" - @backend - end + self.backend = "Yaml" unless defined?(@backend) + @backend end def backend=(name) |