summaryrefslogtreecommitdiffstats
path: root/ext/tk/sample/tkfrom.rb
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-29 08:05:30 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-07-29 08:05:30 +0000
commit5fef3d6bc029a9f2d6b8d89044d458678046ec01 (patch)
treeafab7bccab385e1c51a7ef3133a831fca0d97561 /ext/tk/sample/tkfrom.rb
parent8719f269f064d9134d193eb7688f510ebadd6ae7 (diff)
downloadruby-5fef3d6bc029a9f2d6b8d89044d458678046ec01.tar.gz
ruby-5fef3d6bc029a9f2d6b8d89044d458678046ec01.tar.xz
ruby-5fef3d6bc029a9f2d6b8d89044d458678046ec01.zip
* bug fix ( tested with Ruby/Tk widget demo )
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/tkfrom.rb')
-rw-r--r--ext/tk/sample/tkfrom.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/tk/sample/tkfrom.rb b/ext/tk/sample/tkfrom.rb
index 8c3efb813..e0e7f4810 100644
--- a/ext/tk/sample/tkfrom.rb
+++ b/ext/tk/sample/tkfrom.rb
@@ -54,9 +54,9 @@ if ARGV.length == 0
if ENV['MAIL']
ARGV[0] = ENV['MAIL']
elsif ENV['USER']
- ARGV[0] = '/usr/spool/mail/' + ENV['USER']
+ ARGV[0] = '/var/spool/mail/' + ENV['USER']
elsif ENV['LOGNAME']
- ARGV[0] = '/usr/spool/mail/' + ENV['LOGNAME']
+ ARGV[0] = '/var/spool/mail/' + ENV['LOGNAME']
end
end
@@ -64,7 +64,7 @@ require "tk"
list = scroll = nil
TkFrame.new{|f|
list = TkListbox.new(f) {
- yscroll proc{|idx|
+ yscroll proc{|*idx|
scroll.set *idx
}
relief 'raised'
@@ -94,7 +94,7 @@ root.bind "space", proc{exit}
$outcount = 0;
for file in ARGV
- next if File.exist?(file)
+ next unless File.exist?(file)
atime = File.atime(file)
mtime = File.mtime(file)
f = open(file, "r")