summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-22 08:55:40 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-04-22 08:55:40 +0000
commit089d61b4247f5e7e95bfa7dd3c0daa6cbe45fe92 (patch)
tree0caaa764178837e0a69c23ed184d511aac7fae31
parent42e7ea3f1b5343a01e7dcb0a546a153913be72c2 (diff)
find.rb
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--lib/find.rb2
-rw-r--r--lib/pstore.rb18
2 files changed, 11 insertions, 9 deletions
diff --git a/lib/find.rb b/lib/find.rb
index 5ecc54329c3..7a6dbce17a7 100644
--- a/lib/find.rb
+++ b/lib/find.rb
@@ -12,7 +12,7 @@ module Find
while file = path.shift
catch(:prune) {
yield file
- if File.directory? file and not File.symlink? file then
+ if File.directory? file then
d = Dir.open(file)
begin
for f in d
diff --git a/lib/pstore.rb b/lib/pstore.rb
index 2a0bc11e489..b93420d6499 100644
--- a/lib/pstore.rb
+++ b/lib/pstore.rb
@@ -108,13 +108,15 @@ class PStore
end
end
-db = PStore.new("/tmp/foo")
-db.transaction do
- p db.roots
- ary = db["root"] = [1,2,3,4]
- ary[0] = [1,1.5]
-end
+if __FILE__ == $0
+ db = PStore.new("/tmp/foo")
+ db.transaction do
+ p db.roots
+ ary = db["root"] = [1,2,3,4]
+ ary[0] = [1,1.5]
+ end
-db.transaction do
- p db["root"]
+ db.transaction do
+ p db["root"]
+ end
end