aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Richard Brown <rbrown@exherbo.org> 2009-04-04 21:28:10 +0100
committerAvatar Richard Brown <rbrown@exherbo.org> 2009-04-04 21:28:10 +0100
commit43a974d177d1587bcacfef350e4b9574d8f6170b (patch)
tree279653def516fd0d6f7a7ca8e6d0ffdb7e8f9155
parentba78affd4a9b70b087dfd82cdf457e6365aa382b (diff)
downloadpaludis-43a974d177d1587bcacfef350e4b9574d8f6170b.tar.gz
paludis-43a974d177d1587bcacfef350e4b9574d8f6170b.tar.xz
when ... : -> when ... then
-rwxr-xr-xruby/demos/find_unused_distfiles.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/ruby/demos/find_unused_distfiles.rb b/ruby/demos/find_unused_distfiles.rb
index 1e8241a..928be5f 100755
--- a/ruby/demos/find_unused_distfiles.rb
+++ b/ruby/demos/find_unused_distfiles.rb
@@ -71,10 +71,10 @@ opts.each do | opt, arg |
if arg =~ /^[0-9]+[gmkb]$/i then
size_limit = arg[0..-2].to_i *
case arg.downcase[-1]
- when ?b: 1
- when ?k: 1024
- when ?m: 1024 * 1024
- when ?g: 1024 * 1024 * 1024
+ when ?b then 1
+ when ?k then 1024
+ when ?m then 1024 * 1024
+ when ?g then 1024 * 1024 * 1024
end
else
puts "Bad --size-limit value " + arg
@@ -85,11 +85,11 @@ opts.each do | opt, arg |
if arg =~ /^[0-9]+[ymwdh]/ then
time_limit = Time.now - arg[0..-2].to_i *
case arg.downcase[-1]
- when ?h: 60 * 60
- when ?d: 60 * 60 * 24
- when ?w: 60 * 60 * 24 * 7
- when ?m: 60 * 60 * 24 * 30
- when ?y: 60 * 60 * 24 * 365
+ when ?h then 60 * 60
+ when ?d then 60 * 60 * 24
+ when ?w then 60 * 60 * 24 * 7
+ when ?m then 60 * 60 * 24 * 30
+ when ?y then 60 * 60 * 24 * 365
end
else
puts "Bad --time-limit value " + arg