aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/module/delegation.rb
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-06-26 20:15:35 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2013-06-26 20:17:58 -0300
commitbbbedeeb890dd88023c8c5c85dcbd4d2144aa129 (patch)
treee14b34e39a6d880ee006a87e6fadae28265d3563 /activesupport/lib/active_support/core_ext/module/delegation.rb
parentb49405f1a27bd673bc142acdf18cda018d539771 (diff)
downloadrails-bbbedeeb890dd88023c8c5c85dcbd4d2144aa129.tar.gz
rails-bbbedeeb890dd88023c8c5c85dcbd4d2144aa129.tar.bz2
rails-bbbedeeb890dd88023c8c5c85dcbd4d2144aa129.zip
Move delegation error constant to inside Module
Diffstat (limited to 'activesupport/lib/active_support/core_ext/module/delegation.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/module/delegation.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb
index 9d4b78e242..1aa72da743 100644
--- a/activesupport/lib/active_support/core_ext/module/delegation.rb
+++ b/activesupport/lib/active_support/core_ext/module/delegation.rb
@@ -1,4 +1,8 @@
class Module
+ # Error generated by +delegate+ when a method is called on +nil+ and +allow_nil+
+ # option is not used.
+ class DelegationError < NoMethodError; end
+
# Provides a +delegate+ class method to easily expose contained objects'
# public methods as your own.
#
@@ -194,5 +198,3 @@ class Module
end
end
end
-
-class DelegationError < StandardError ; end