summaryrefslogtreecommitdiff
path: root/sample/dir.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/dir.rb')
-rw-r--r--sample/dir.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/sample/dir.rb b/sample/dir.rb
index 3349dc7b6d..1fc0bb2aa8 100644
--- a/sample/dir.rb
+++ b/sample/dir.rb
@@ -1,9 +1,9 @@
# directory access
# list all files but .*/*~/*.o
dirp = Dir.open(".")
-dirp.rewind
for f in dirp
- if !(~/^\./ || ~/~$/ || ~/\.o/)
+ $_ = f
+ if (~/^\./ || ~/~$/ || ~/\.o/)
print f, "\n"
end
end