aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/json
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-06-08 19:29:24 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-06-08 19:37:51 -0700
commite1f679a020be4dcf2052111bcab833e28e0bc15e (patch)
tree62ea4a9708518f9853959275cb1981eaa2945f95 /activesupport/lib/active_support/json
parent6e73cf6bdf0ab3961f212735b4ac46f7e924fcd5 (diff)
downloadrails-e1f679a020be4dcf2052111bcab833e28e0bc15e.tar.gz
rails-e1f679a020be4dcf2052111bcab833e28e0bc15e.tar.bz2
rails-e1f679a020be4dcf2052111bcab833e28e0bc15e.zip
Simplify json decoder backend lazy load
Diffstat (limited to 'activesupport/lib/active_support/json')
-rw-r--r--activesupport/lib/active_support/json/decoding.rb6
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)