Permalink
Browse files

Simplify json decoder backend lazy load

  • Loading branch information...
1 parent 6e73cf6 commit e1f679a020be4dcf2052111bcab833e28e0bc15e @jeremy jeremy committed Jun 9, 2009
Showing with 2 additions and 4 deletions.
  1. +2 −4 activesupport/lib/active_support/json/decoding.rb
View
6 activesupport/lib/active_support/json/decoding.rb
@@ -9,10 +9,8 @@ class << self
delegate :decode, :to => :backend
def backend
- @backend || begin
- self.backend = "Yaml"
- @backend
- end
+ self.backend = "Yaml" unless defined?(@backend)
+ @backend
end
def backend=(name)

0 comments on commit e1f679a

Please sign in to comment.