aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/module
diff options
context:
space:
mode:
authorToshimaru <me@toshimaru.net>2016-12-09 04:55:21 +0900
committerToshimaru <me@toshimaru.net>2016-12-09 05:21:11 +0900
commitd9ff835b99ff3c7567ccde9b1379b4deeabee32f (patch)
tree93b9258440a74ddb9f0978f5b42d8850de28fdfe /activesupport/lib/active_support/core_ext/module
parent7407d35c5417b6ef872663936a5880ede8ab711c (diff)
downloadrails-d9ff835b99ff3c7567ccde9b1379b4deeabee32f.tar.gz
rails-d9ff835b99ff3c7567ccde9b1379b4deeabee32f.tar.bz2
rails-d9ff835b99ff3c7567ccde9b1379b4deeabee32f.zip
split DELEGATION_RESERVED_METHOD_NAMES in half
Diffstat (limited to 'activesupport/lib/active_support/core_ext/module')
-rw-r--r--activesupport/lib/active_support/core_ext/module/delegation.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb
index f5f4ba61b7..19f692e943 100644
--- a/activesupport/lib/active_support/core_ext/module/delegation.rb
+++ b/activesupport/lib/active_support/core_ext/module/delegation.rb
@@ -6,11 +6,12 @@ class Module
# option is not used.
class DelegationError < NoMethodError; end
+ RUBY_RESERVED_KEYWORDS = %w(alias and BEGIN begin break case class def defined? do
+ else elsif END end ensure false for if in module next nil not or redo rescue retry
+ return self super then true undef unless until when while yield)
+ DELEGATION_RESERVED_KEYWORDS = %w(_ arg args block)
DELEGATION_RESERVED_METHOD_NAMES = Set.new(
- %w(_ arg args alias and BEGIN begin block break case class def defined? do
- else elsif END end ensure false for if in module next nil not or redo
- rescue retry return self super then true undef unless until when while
- yield)
+ RUBY_RESERVED_KEYWORDS + DELEGATION_RESERVED_KEYWORDS
).freeze
# Provides a +delegate+ class method to easily expose contained objects'