Permalink
Browse files

Simplify json decoder backend lazy load

  • Loading branch information...
1 parent f1e75e4 commit 74f16a56e71177f2ca60f33b0ece1c2c551fc39f @jeremy jeremy committed Jun 9, 2009
Showing with 2 additions and 4 deletions.
  1. +2 −4 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 74f16a5

Please sign in to comment.