diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-03 09:47:16 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-01-03 09:47:16 +0000 |
commit | 0886a02707a95d5d893d0a5de98cdce634cec7d1 (patch) | |
tree | 70bc4233fc7f35ea82918060369841a4271ca78e | |
parent | a50cc9ce082a9e356d0bc188785973ebbd0529ff (diff) | |
download | ruby-0886a02707a95d5d893d0a5de98cdce634cec7d1.tar.gz |
forwardable.rb: fix branches
* lib/forwardable.rb (instance_delegate, single_delegate): fix
inverted branches.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/forwardable.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/forwardable.rb b/lib/forwardable.rb index ef2cf74370..3662f56011 100644 --- a/lib/forwardable.rb +++ b/lib/forwardable.rb @@ -131,7 +131,7 @@ module Forwardable # def instance_delegate(hash) hash.each do |methods, accessor| - if defined?(methods.each) + unless defined?(methods.each) def_instance_delegator(accessor, methods) else methods.each {|method| def_instance_delegator(accessor, method)} @@ -263,7 +263,7 @@ module SingleForwardable # def single_delegate(hash) hash.each do |methods, accessor| - if defined?(methods.each) + unless defined?(methods.each) def_single_delegator(accessor, methods) else methods.each {|method| def_single_delegator(accessor, method)} |