Skip to content

Commit

Permalink
Merge pull request #39302 from dustym/add-delegation_reserved_method_…
Browse files Browse the repository at this point in the history
…names

Add delegation constants to Module
  • Loading branch information
tenderlove committed May 15, 2020
1 parent b9e5577 commit 1f3db0a
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -11,6 +11,14 @@ class DelegationError < NoMethodError; end
return self super then true undef unless until when while yield)
).freeze

DELEGATION_RESERVED_KEYWORDS = Set.new(
%w(_ arg args block)
)

DELEGATION_RESERVED_METHOD_NAMES = Set.new(
RUBY_RESERVED_WORDS + DELEGATION_RESERVED_KEYWORDS
).freeze

# Provides a +delegate+ class method to easily expose contained objects'
# public methods as your own.
#
Expand Down

0 comments on commit 1f3db0a

Please sign in to comment.