Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Simplify json decoder backend lazy load

  • Loading branch information...
commit 74f16a56e71177f2ca60f33b0ece1c2c551fc39f 1 parent f1e75e4
@jeremy jeremy authored
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)
Please sign in to comment.
Something went wrong with that request. Please try again.