From: bbiker Date: 2007-08-15T04:15:01+09:00 Subject: Re: Non Existent Method Dir.empty? Description via "ri" On Aug 14, 1:33 pm, "Wolfgang N�dasi-donner" wrote: > Daniel Berger wrote: > > On Aug 12, 3:01 pm, "Wolfgang N?dasi-donner" > > wrote: > >> ------------------------------------------------------------------------ > >> Returns whether or not +path+ is empty. Returns false if +path+ is > >> not a directory, or contains any files other than '.' or '..'. > > >> C:\Dokumente und Einstellungen\wolfgang>irb > >> irb(main):001:0> Dir::empty?('./') > >> NoMethodError: undefined method `empty?' for Dir:Class > >> from (irb):1 > >> irb(main):002:0> > > > You're picking up Dir.empty? from win32-dir, which ships with the one- > > click installer. In order to use it, you have to require it first. :) > > Booofff... - thank you for this information! > > irb(main):001:0> require 'win32/dir' > => true > irb(main):002:0> Dir::empty?('./') > => false > > Unfortunately it is not visible in the ri output where the method comes > from. > > Wolfgang N�dasi-Donner > -- > Posted viahttp://www.ruby-forum.com/. It does not seem to work on my system C:\Documents and Settings\Owner>irb irb(main):001:0> require 'win32/dir' => true irb(main):002:0> Dir::empty?('./') NoMethodError: undefined method `empty?' for Dir:Class from (irb):2 using win32-dir version 0.3.2