[BUG?] Dir.glob and space in folders names

Hello,

I’m using ruby1.6.8[1] and this Dir.glob fails:

oct@baillet:~/temp$ mkdir “foo bar"
oct@baillet:~/temp$ touch foo\ bar/test
oct@baillet:~/temp$ ruby -e “p Dir.glob(‘foo bar/’).inspect"
"[]"
oct@baillet:~/temp$ ruby -e "p Dir.glob('foo\ bar/
’).inspect”
”[]"

I suppose this is not a real bug, so is there a workaround to make this
work ?

1: oct@baillet:~/temp$ ruby -v
ruby 1.6.8 (2002-12-24) [i386-linux]

Thanks for you clues :slight_smile:

···


Pierre Baillet
Pour qu’il y ait le moins de mécontents possible,
il faut toujours taper sur les mêmes.
Devise Shadok

I'm using ruby1.6.8[1] and this Dir.glob fails:

it's corrected in 1.8

pigeon% /usr/bin/ruby -ve 'p Dir.glob("a b/*")'
ruby 1.6.8 (2002-12-24) [i686-linux]

pigeon%

pigeon% ruby -ve 'p Dir.glob("a b/*")'
ruby 1.8.0 (2003-03-23) [i686-linux]
["a b/c"]
pigeon%

Guy Decoux

Guy,

thanks for your quick reply.

This bugs triggers a problem in PragDave rublog.

I wonder (sorry for my ignorance) if 1.8 is on the way to be packaged
(as 1.7 is in the debian and is supposed to be an unstable version) ?

I stumbled over Akira Yamada webpage[1] which describes two apt
sources[2] for debian, but they doesn’t seem to contain any ruby1.8 version.

Thanks for any hint :slight_smile:

···

On Wed, Mar 26, 2003, ts wrote:

I’m using ruby1.6.8[1] and this Dir.glob fails:

it’s corrected in 1.8

pigeon% /usr/bin/ruby -ve ‘p Dir.glob(“a b/*”)’
ruby 1.6.8 (2002-12-24) [i686-linux]

pigeon%

pigeon% ruby -ve ‘p Dir.glob(“a b/*”)’
ruby 1.8.0 (2003-03-23) [i686-linux]
[“a b/c”]
pigeon%

Guy Decoux

1: http://arika.org/ruby/
2: deb http://deb.ruby-lang.org/debian unstable main contrib non-free
deb http://deb.ruby-lang.org/debian project/experimental/


Pierre Baillet
If you want the answers, you better get ready for the fire
System of a Down

Ruby 1.8 hasn’t been finalised yet. You can download a preview
package, or build your own from CVS, but in the meantime, you may be
better off with 1.7, depending on your requirements.

Gavin

···

On Wednesday, March 26, 2003, 10:38:40 PM, Pierre wrote:

Guy,

thanks for your quick reply.

This bugs triggers a problem in PragDave rublog.

I wonder (sorry for my ignorance) if 1.8 is on the way to be packaged
(as 1.7 is in the debian and is supposed to be an unstable version) ?

I stumbled over Akira Yamada webpage[1] which describes two apt
sources[2] for debian, but they doesn’t seem to contain any ruby1.8 version.

Thanks for any hint :slight_smile: