Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
1c3ece12
Commit
1c3ece12
authored
7 years ago
by
Misty De Meo
Browse files
Options
Downloads
Patches
Plain Diff
Tap.each: return an enumerable when no block given
parent
1cae6dd6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Library/Homebrew/tap.rb
+2
-0
2 additions, 0 deletions
Library/Homebrew/tap.rb
Library/Homebrew/test/tap_spec.rb
+6
-0
6 additions, 0 deletions
Library/Homebrew/test/tap_spec.rb
with
8 additions
and
0 deletions
Library/Homebrew/tap.rb
+
2
−
0
View file @
1c3ece12
...
...
@@ -486,6 +486,8 @@ class Tap
def
self
.
each
return
unless
TAP_DIRECTORY
.
directory?
return
to_enum
unless
block_given?
TAP_DIRECTORY
.
subdirs
.
each
do
|
user
|
user
.
subdirs
.
each
do
|
repo
|
yield
fetch
(
user
.
basename
.
to_s
,
repo
.
basename
.
to_s
)
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/test/tap_spec.rb
+
6
−
0
View file @
1c3ece12
...
...
@@ -297,6 +297,12 @@ describe Tap do
subject
.
config
[
"foo"
]
=
nil
expect
(
subject
.
config
[
"foo"
]).
to
be
nil
end
describe
"#each"
do
it
"returns an enumerator if no block is passed"
do
expect
(
described_class
.
each
).
to
be_an_instance_of
(
Enumerator
)
end
end
end
describe
CoreTap
do
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment