X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=lib%2Fsup%2Futil.rb;h=068ce6bad904c9012bdcd5d8883ac48a68e59976;hb=ef1d8a9333f8d261deeb88a7c1cb0cc58d7b6563;hp=9c1a84ad2077f8308f5e394e1430474eae6c493f;hpb=5c7b9471760aec2a7e56f8cb3b00c9c2ac2ae13c;p=sup diff --git a/lib/sup/util.rb b/lib/sup/util.rb index 9c1a84a..068ce6b 100644 --- a/lib/sup/util.rb +++ b/lib/sup/util.rb @@ -25,6 +25,7 @@ class Lockfile def lockinfo_on_disk h = load_lock_id IO.read(path) h['mtime'] = File.mtime path + h['path'] = path h end @@ -91,7 +92,7 @@ end class Range ## only valid for integer ranges (unless I guess it's exclusive) - def size + def size last - first + (exclude_end? ? 0 : 1) end end