From: Chris T. <ch...@m-...> - 2004-01-16 22:42:53
|
Looks like a bug in Dir.glob in 1.6.8. The enclosed patch is against the /template directory only, I haven't checked the examples yet. Although this seems to be fixed in 1.8.1, Panther includes a 1.6.8 libruby.dylib. It would be nice to be able to distribute smaller applications by embedding the RubyCocoa framework and linking against libruby.dylib. Because libruby is part of the BSD subset of the system, this isn't really a guarantee the resulting app will work on a random end-user system or continue to work in the future -- but it's still convenient for ad-hoc applications. Chris irb(main):001:0> VERSION => "1.6.8" irb(main):002:0> Dir.chdir "/Users/chris/Code/Whisper/Examples" => 0 irb(main):003:0> Dir.entries("XML Compiler") => [".", "..", "CVS", "Read Me.txt", "Resources", "Source", "XML Compiler Data", "XML Compiler.mcp"] irb(main):004:0> Dir.glob("XML Compiler/*") => [] irb(main):005:0> Dir.entries("StringTableBuilder") => [".", "..", "CVS", "Read Me.txt", "Resources", "Source", "StringTableBuilder Data", "StringTableBuilder.mcp"] irb(main):006:0> Dir.glob("StringTableBuilder/*") => ["StringTableBuilder/CVS", "StringTableBuilder/Read Me.txt", "StringTableBuilder/Resources", "StringTableBuilder/Source", "StringTableBuilder/StringTableBuilder Data", "StringTableBuilder/StringTableBuilder.mcp"] Fixed in 1.8.1: irb(main):002:0> VERSION => "1.8.1" irb(main):003:0> Dir.chdir "/Users/chris/Code/Whisper/Examples" => 0 irb(main):004:0> Dir.entries("XML Compiler") => [".", "..", "CVS", "Read Me.txt", "Resources", "Source", "XML Compiler Data", "XML Compiler.mcp"] irb(main):005:0> Dir.glob("XML Compiler/*") => ["XML Compiler/CVS", "XML Compiler/Read Me.txt", "XML Compiler/Resources", "XML Compiler/Source", "XML Compiler/XML Compiler Data", "XML Compiler/XML Compiler.mcp"] |