From 3202fbabe6df3591d7e2c35727ea9c8b68df8828 Mon Sep 17 00:00:00 2001 From: Sam Stephenson Date: Sun, 18 Mar 2007 07:05:58 +0000 Subject: Refactor ActiveSupport::JSON to be less obtuse. Add support for JSON decoding by way of Syck with ActiveSupport::JSON.decode(json_string). Prevent hash keys that are JavaScript reserved words from being unquoted during encoding. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6443 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/vendor/builder/blankslate.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support/vendor/builder') diff --git a/activesupport/lib/active_support/vendor/builder/blankslate.rb b/activesupport/lib/active_support/vendor/builder/blankslate.rb index 23b95170d9..57701d8713 100644 --- a/activesupport/lib/active_support/vendor/builder/blankslate.rb +++ b/activesupport/lib/active_support/vendor/builder/blankslate.rb @@ -48,13 +48,13 @@ module Kernel #:nodoc: end end -class Object #:nodoc: +class Object class << self alias_method :blank_slate_method_added, :method_added # Detect method additions to Object and remove them in the # BlankSlate class. - def method_added(name) + def method_added(name) #:nodoc: blank_slate_method_added(name) return if self != Object Builder::BlankSlate.hide(name) -- cgit v1.2.3