aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/json/encoders/core.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/json/encoders/core.rb')
-rw-r--r--activesupport/lib/active_support/json/encoders/core.rb4
1 files changed, 4 insertions, 0 deletions
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