diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-05-10 10:47:49 -0500 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-05-12 13:24:32 -0700 |
commit | f2e4bf218f95ab279e1a1527c37115faf65ac283 (patch) | |
tree | 0d9f98de841f5ecefdce805c4689fb52f5ae34f0 /activesupport/lib/active_support/core_ext | |
parent | 828914a062d3fd6cd51ebd3881acea11eede45cc (diff) | |
download | rails-f2e4bf218f95ab279e1a1527c37115faf65ac283.tar.gz rails-f2e4bf218f95ab279e1a1527c37115faf65ac283.tar.bz2 rails-f2e4bf218f95ab279e1a1527c37115faf65ac283.zip |
Use #duplicable? instead of anonymous rescue
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb b/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb index 371d074d34..8724a492bf 100644 --- a/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb +++ b/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb @@ -128,7 +128,7 @@ class Class # :nodoc: new_inheritable_attributes = EMPTY_INHERITABLE_ATTRIBUTES else new_inheritable_attributes = inheritable_attributes.inject({}) do |memo, (key, value)| - memo.update(key => (value.dup rescue value)) + memo.update(key => value.duplicable? ? value.dup : value) end end |