From 9d6d07ddf46024f3af71c386c69b2af9f70de32a Mon Sep 17 00:00:00 2001 From: Robin Dupret Date: Thu, 31 Oct 2013 11:42:39 +0100 Subject: Require bigdecimal before monkey-patching it If we try to monkey-patch the class before requiring it, then a "superclass mismatch" (TypeError) error is raised and the build can't run correctly. Fixes #12708 --- activesupport/lib/active_support/core_ext/object/json.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'activesupport/lib/active_support/core_ext/object/json.rb') diff --git a/activesupport/lib/active_support/core_ext/object/json.rb b/activesupport/lib/active_support/core_ext/object/json.rb index 1cbc935c30..8586d7eb16 100644 --- a/activesupport/lib/active_support/core_ext/object/json.rb +++ b/activesupport/lib/active_support/core_ext/object/json.rb @@ -1,5 +1,6 @@ # Hack to load json gem first so we can overwrite its to_json. require 'json' +require 'bigdecimal' # The JSON gem adds a few modules to Ruby core classes containing :to_json definition, overwriting # their default behavior. That said, we need to define the basic to_json method in all of them, -- cgit v1.2.3