diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/forwardable.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/forwardable.rb b/lib/forwardable.rb index 7f219235d0..3ca8a252dd 100644 --- a/lib/forwardable.rb +++ b/lib/forwardable.rb @@ -149,9 +149,8 @@ module Forwardable # def_delegator :@records, :map # def def_instance_delegators(accessor, *methods) - methods.delete("__send__") - methods.delete("__id__") - for method in methods + methods.each do |method| + next if method.to_s == "__send__" || method.to_s == "__id__" def_instance_delegator(accessor, method) end end @@ -286,9 +285,8 @@ module SingleForwardable # def_delegator :@records, :map # def def_single_delegators(accessor, *methods) - methods.delete("__send__") - methods.delete("__id__") - for method in methods + methods.each do |method| + next if method.to_s == "__send__" || method.to_s == "__id__" def_single_delegator(accessor, method) end end |