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
7c83e3ff
Commit
7c83e3ff
authored
9 years ago
by
Jack Nagel
Browse files
Options
Downloads
Patches
Plain Diff
Remove workarounds for destructuring single-element hashes
parent
ec1727a1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Library/Homebrew/compilers.rb
+1
-1
1 addition, 1 deletion
Library/Homebrew/compilers.rb
Library/Homebrew/dependency_collector.rb
+1
-9
1 addition, 9 deletions
Library/Homebrew/dependency_collector.rb
with
2 additions
and
10 deletions
Library/Homebrew/compilers.rb
+
1
−
1
View file @
7c83e3ff
...
...
@@ -32,7 +32,7 @@ class CompilerFailure
def
self
.
create
(
spec
,
&
block
)
# Non-Apple compilers are in the format fails_with compiler => version
if
spec
.
is_a?
(
Hash
)
_
,
major_version
=
spec
.
each
{
|
e
|
break
e
}
_
,
major_version
=
spec
.
first
name
=
"gcc-
#{
major_version
}
"
# so fails_with :gcc => '4.8' simply marks all 4.8 releases incompatible
version
=
"
#{
major_version
}
.999"
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/dependency_collector.rb
+
1
−
9
View file @
7c83e3ff
...
...
@@ -57,20 +57,12 @@ class DependencyCollector
end
def
build
(
spec
)
spec
,
tags
=
case
spec
when
Hash
then
destructure_spec_hash
(
spec
)
else
spec
end
spec
,
tags
=
Hash
===
spec
?
spec
.
first
:
spec
parse_spec
(
spec
,
Array
(
tags
))
end
private
def
destructure_spec_hash
(
spec
)
spec
.
each
{
|
o
|
return
o
}
end
def
parse_spec
(
spec
,
tags
)
case
spec
when
String
...
...
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