Skip to content

Commit

Permalink
Merge pull request #275 from zhustec/master
Browse files Browse the repository at this point in the history
Remove trailing extension name
  • Loading branch information
hsbt committed Oct 9, 2018
2 parents 51fdc40 + a54a506 commit 2a16d03
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/rake/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ def print_rakefile_directory(location) # :nodoc:

def raw_load_rakefile # :nodoc:
rakefile, location = find_rakefile_location
if (! options.ignore_system) &&
if (!options.ignore_system) &&
(options.load_system || rakefile.nil?) &&
system_dir && File.directory?(system_dir)
print_rakefile_directory(location)
Expand Down
2 changes: 1 addition & 1 deletion lib/rake/file_creation_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module Rake
class FileCreationTask < FileTask
# Is this file task needed? Yes if it doesn't exist.
def needed?
! File.exist?(name)
!File.exist?(name)
end

# Time stamp for file creation task. This time stamp is earlier
Expand Down
2 changes: 1 addition & 1 deletion lib/rake/file_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def excluded_from_list?(fn)
/~$/
]
DEFAULT_IGNORE_PROCS = [
proc { |fn| fn =~ /(^|[\/\\])core$/ && ! File.directory?(fn) }
proc { |fn| fn =~ /(^|[\/\\])core$/ && !File.directory?(fn) }
]

def import(array) # :nodoc:
Expand Down
4 changes: 2 additions & 2 deletions lib/rake/file_task.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true
require "rake/task.rb"
require "rake/task"
require "rake/early_time"

module Rake
Expand All @@ -14,7 +14,7 @@ class FileTask < Task
# Is this file task needed? Yes if it doesn't exist, or if its time stamp
# is out of date.
def needed?
! File.exist?(name) || out_of_date?(timestamp) || @application.options.build_all
!File.exist?(name) || out_of_date?(timestamp) || @application.options.build_all
end

# Time stamp for file task.
Expand Down
4 changes: 2 additions & 2 deletions lib/rake/file_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ module FileUtils
#
# # check exit status after command runs
# sh %{grep pattern file} do |ok, res|
# if ! ok
# if !ok
# puts "pattern not found (status = #{res.exitstatus})"
# end
# end
Expand Down Expand Up @@ -111,7 +111,7 @@ def ruby(*args, &block)
# Attempt to do a normal file link, but fall back to a copy if the link
# fails.
def safe_ln(*args)
if ! LN_SUPPORTED[0]
if !LN_SUPPORTED[0]
cp(*args)
else
begin
Expand Down
4 changes: 2 additions & 2 deletions lib/rake/promise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ def chore

# Do we have a result for the promise
def result?
! @result.equal?(NOT_SET)
!@result.equal?(NOT_SET)
end

# Did the promise throw an error
def error?
! @error.equal?(NOT_SET)
!@error.equal?(NOT_SET)
end

# Are we done with the promise
Expand Down
2 changes: 1 addition & 1 deletion lib/rake/scope.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def path_with_task_name(task_name)
# this trim beyond the toplevel scope.
def trim(n)
result = self
while n > 0 && ! result.empty?
while n > 0 && !result.empty?
result = result.tail
n -= 1
end
Expand Down
2 changes: 1 addition & 1 deletion lib/rake/task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def timestamp
def add_description(description)
return unless description
comment = description.strip
add_comment(comment) if comment && ! comment.empty?
add_comment(comment) if comment && !comment.empty?
end

def comment=(comment) # :nodoc:
Expand Down

0 comments on commit 2a16d03

Please sign in to comment.