repo.or.cz
/
ruby-svn.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
* io.c (rb_open_file): encoding in mode string was ignored if perm is
[ruby-svn.git]
/
sample
/
dir.rb
blob
b627383946d34616322125fa2bbbaf814c8af90c
1
# directory access
2
# list all files but .*/*~/*.o
3
dirp = Dir.open(".")
4
for f in dirp
5
case f
6
when /^\./, /~$/, /\.o/
7
# do not print
8
else
9
print f, "\n"
10
end
11
end
12
dirp.close