Okay, two separate bugs. One probably on all platforms and one more serious
one only on mswindows.
BUG 1 (MS only)
···
=====
Using the version with the automatic installer on windows and cygwin, too.
$ C:/ruby/bin/ruby -v
ruby 1.8.0 (2003-08-04) [i386-mswin32]
$ ruby -v
ruby 1.8.0 (2003-08-04) [i386-cygwin]
A simple script that returns the directory contents of a dir.
#!/usr/bin/ruby
puts ARGV[0]
Dir.foreach(ARGV[0]) { |i|
print i, " "
}
$ bug.fb C:
will instead open and list the current directory on ruby mswin32, instead of C:
$ bug.fb C:/
works fine.
Both work properly opening under ruby cygwin.
BUG 2
#!/usr/bin/ruby
puts ARGV[0]
Dir.open(ARGV[0]) { |i|
print i, " "
}
will print:
C:\ruby\learningGGA>bug2.rb C:
C:
#Dir:0x2847fa8
on any of my two ruby versions. This is inconsistent with what ri docs say it
should do.