summaryrefslogtreecommitdiff
path: root/sample/dir.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/dir.rb')
-rw-r--r--sample/dir.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/sample/dir.rb b/sample/dir.rb
new file mode 100644
index 0000000000..f4c3d17c11
--- /dev/null
+++ b/sample/dir.rb
@@ -0,0 +1,9 @@
+dirp = Dir.open(".")
+dirp.rewind
+for f in dirp
+ if (~/^\./ || ~/~$/ || ~/\.o/)
+ else
+ print(f, "\n")
+ end
+end
+dirp.close