From 20d29b379767713c64397a28105d1b74f0f36f5f Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 29 Dec 2007 19:43:07 +0000 Subject: Ruby 1.9 compat: introduce ActiveSupport::FrozenObjectError normalize TypeError vs RuntimeError handling. Closes #10645 [Frederick Cheung] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8510 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/exception.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'activesupport/lib/active_support/core_ext') diff --git a/activesupport/lib/active_support/core_ext/exception.rb b/activesupport/lib/active_support/core_ext/exception.rb index 14cd577066..57c8568334 100644 --- a/activesupport/lib/active_support/core_ext/exception.rb +++ b/activesupport/lib/active_support/core_ext/exception.rb @@ -1,3 +1,11 @@ +module ActiveSupport + if RUBY_VERSION >= '1.9' + FrozenObjectError = RuntimeError + else + FrozenObjectError = TypeError + end +end + class Exception # :nodoc: def clean_message Pathname.clean_within message -- cgit v1.2.3