diff options
-rw-r--r-- | lib/find.rb | 2 | ||||
-rw-r--r-- | lib/pstore.rb | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/lib/find.rb b/lib/find.rb index 5ecc54329c..7a6dbce17a 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 2a0bc11e48..b93420d649 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 |