Pathname: remove trailing spaces
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
5cc4b1c991
commit
212927ee54
@ -84,7 +84,7 @@ class Pathname
|
||||
raise unless e.errno == Errno::ENOTEMPTY::Errno or e.errno == Errno::EACCES::Errno
|
||||
false
|
||||
end
|
||||
|
||||
|
||||
def chmod_R perms
|
||||
require 'fileutils'
|
||||
FileUtils.chmod_R perms, to_s
|
||||
@ -139,7 +139,7 @@ class Pathname
|
||||
# eg. ruby-1.9.1-p243
|
||||
/-((\d+\.)*\d\.\d+-(p|rc|RC)?\d+)$/.match stem
|
||||
return $1 if $1
|
||||
|
||||
|
||||
# eg. lame-398-1
|
||||
/-((\d)+-\d)/.match stem
|
||||
return $1 if $1
|
||||
@ -185,7 +185,7 @@ class Pathname
|
||||
|
||||
nil
|
||||
end
|
||||
|
||||
|
||||
def incremental_hash(hasher)
|
||||
incr_hash = hasher.new
|
||||
self.open('r') do |f|
|
||||
@ -200,12 +200,12 @@ class Pathname
|
||||
require 'digest/md5'
|
||||
incremental_hash(Digest::MD5)
|
||||
end
|
||||
|
||||
|
||||
def sha1
|
||||
require 'digest/sha1'
|
||||
incremental_hash(Digest::SHA1)
|
||||
end
|
||||
|
||||
|
||||
def sha2
|
||||
require 'digest/sha2'
|
||||
incremental_hash(Digest::SHA2)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user