From 2e67f1adc8e52121270d1139665a965e3f0792d8 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Fri, 3 Mar 2006 19:34:23 +0000 Subject: RJS now does enumerations, baby! (closes #3876) [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3754 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/json/encoders/core.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activesupport/lib/active_support/json') diff --git a/activesupport/lib/active_support/json/encoders/core.rb b/activesupport/lib/active_support/json/encoders/core.rb index 003c938be4..d3193af555 100644 --- a/activesupport/lib/active_support/json/encoders/core.rb +++ b/activesupport/lib/active_support/json/encoders/core.rb @@ -56,6 +56,10 @@ module ActiveSupport result << '}' end end + + define_encoder Regexp do |regexp| + regexp.inspect + end end end end -- cgit v1.2.3