diff options
Diffstat (limited to 'sample/dir.rb')
-rw-r--r-- | sample/dir.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sample/dir.rb b/sample/dir.rb index f4c3d17c11..f269c568ba 100644 --- a/sample/dir.rb +++ b/sample/dir.rb @@ -1,9 +1,10 @@ +# directory access +# list all files but .*/*~/*.o dirp = Dir.open(".") dirp.rewind for f in dirp - if (~/^\./ || ~/~$/ || ~/\.o/) - else - print(f, "\n") + unless (~/^\./ || ~/~$/ || ~/\.o/) + print f, "\n" end end dirp.close |