Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings in dependency.rb #720

Merged
merged 3 commits into from
Mar 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

##### Bug Fixes

* None.
* Fix warnings in `dependency.rb`.
[Nick Cooke](https://github.com/ncooke3)
[#720](https://github.com/CocoaPods/Core/pull/720)


## 1.11.3 (2022-03-11)
Expand Down
4 changes: 3 additions & 1 deletion lib/cocoapods-core/dependency.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,13 @@ def initialize(name = nil, *requirements)
end
@name = name
@requirement = Requirement.create(requirements)
@specific_requirement ||= nil
@external_source ||= nil
Comment on lines +102 to +103
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes both warning: instance variable ... not initialized warnings.

end

# @return [Version] whether the dependency points to a specific version.
#
attr_accessor :specific_version
attr_reader :specific_version
Comment on lines -106 to +108
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixes warning: method redefined; discarding old ... warning.


# @return [Requirement] the requirement of this dependency (a set of
# one or more version restrictions).
Expand Down