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
b42f646c
Commit
b42f646c
authored
8 years ago
by
Mike McQuaid
Browse files
Options
Downloads
Patches
Plain Diff
extend/pathname: fix Rubocop warnings.
parent
6a817827
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/extend/pathname.rb
+5
-5
5 additions, 5 deletions
Library/Homebrew/extend/pathname.rb
with
5 additions
and
5 deletions
Library/Homebrew/extend/pathname.rb
+
5
−
5
View file @
b42f646c
...
...
@@ -20,7 +20,7 @@ module DiskUsageExtension
out
=
""
compute_disk_usage
out
<<
"
#{
number_readable
(
@file_count
)
}
files, "
if
@file_count
>
1
out
<<
"
#{
disk_usage_readable
(
@disk_usage
)
}
"
out
<<
disk_usage_readable
(
@disk_usage
)
.
to_s
end
private
...
...
@@ -153,7 +153,7 @@ class Pathname
end
unless
method_defined?
(
:binwrite
)
def
binread
(
*
open_args
)
open
(
"rb"
,
*
open_args
)
{
|
f
|
f
.
read
}
open
(
"rb"
,
*
open_args
,
&
:
read
)
end
unless
method_defined?
(
:binread
)
# NOTE always overwrites
...
...
@@ -196,7 +196,7 @@ class Pathname
# @private
def
cp_path_sub
(
pattern
,
replacement
)
raise
"
#{
self
}
does not exist"
unless
self
.
exist?
raise
"
#{
self
}
does not exist"
unless
exist?
dst
=
sub
(
pattern
,
replacement
)
...
...
@@ -295,7 +295,7 @@ class Pathname
# @private
def
text_executable?
/^#!\s*\S+/
=
==
open
(
"r"
)
{
|
f
|
f
.
read
(
1024
)
}
/^#!\s*\S+/
=
~
open
(
"r"
)
{
|
f
|
f
.
read
(
1024
)
}
end
# @private
...
...
@@ -334,7 +334,7 @@ class Pathname
# @private
def
resolved_path
self
.
symlink?
?
dirname
+
readlink
:
self
symlink?
?
dirname
+
readlink
:
self
end
# @private
...
...
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