diff options
author | Steve Kemp <steve@bytemark.co.uk> | 2016-05-11 14:24:59 +0100 |
---|---|---|
committer | Steve Kemp <steve@bytemark.co.uk> | 2016-05-11 14:24:59 +0100 |
commit | 491f03d89c53a65d6cc084616fc2d9f2f62e58a9 (patch) | |
tree | afc795a0e8438f02194c2e88da914ff79c7e7b0a /lib/byteback | |
parent | 89c2b36aaa3478fc0ad3742cddf66c2abae01b7c (diff) | |
parent | acc0d316c9dd628e3e2d6be438de83b6d7cf6638 (diff) |
Merge branch 'ruby18-errors' into 'master'
Ruby18 errors
Fixes some errors on CentOS 6.
```
$ byteback-prune
/usr/bin/byteback-receive:120: undefined method `+' for nil:NilClass (NoMethodError)
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `inject'
from /usr/bin/byteback-receive:119:in `each'
from /usr/bin/byteback-receive:119:in `inject'
from /usr/bin/byteback-receive:119
# byteback-backup
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /usr/share/byteback/byteback/backup_directory.rb:154: syntax error, unexpected '.', expecting kEND (SyntaxError)
.compact
^
/usr/share/byteback/byteback/backup_directory.rb:194: syntax error, unexpected '.', expecting kEND
.compact
^
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/share/byteback/byteback.rb:3
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/bin/byteback-receive:11
```
See merge request !1
Diffstat (limited to 'lib/byteback')
-rw-r--r-- | lib/byteback/backup_directory.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/byteback/backup_directory.rb b/lib/byteback/backup_directory.rb index 14a55cf..89b0ae9 100644 --- a/lib/byteback/backup_directory.rb +++ b/lib/byteback/backup_directory.rb @@ -150,8 +150,7 @@ module Byteback next if entry[0] == '.' name = File.expand_path(ENV['HOME'] + '/' + entry) File.directory?(name + '/current') ? BackupDirectory.new(name) : nil - end - .compact + end.compact end # Returns every snapshot in every backup directory @@ -190,8 +189,7 @@ module Byteback # directory name must represent a parseable Time nil end - end - .compact + end.compact end # Create a new snapshot of 'current' |