Non Existent Method Dir.empty? Description via "ri"

  • Thread starter Wolfgang Nádasi-donner
  • Start date
W

Wolfgang Nádasi-donner

Eric said:
That's an excellent point Wolfgang. There ought to be a way within ri
for a user to distinguish between a core method and a method added on
by a 3rd party library. I haven't double checked the ri options, but I
don't think there's a way.

ri --system

$ ri Rake::Task -f simple
Class: Rake::Task
[...]
$ ri --system Rake::Task -f simple
Nothing known about Rake::Task

It helps in this case, but if some parts of the standard library change
core classes, the changes are still listed - example: "ri --system
Array" lists yaml stuff.

Wolfgang Nádasi-Donner
 
D

Daniel Berger

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

I doubt it:

C:\>irb
irb(main):001:0> require 'win32/dir'
=> true
irb(main):002:0> Dir.empty?('./')
=> false

You're probably using 0.3.0. The Dir.empty? method was added in 0.3.1.
You can check the Dir::VERSION.

Regards,

Dan
 
B

bbiker

I doubt it:

C:\>irb
irb(main):001:0> require 'win32/dir'
=> true
irb(main):002:0> Dir.empty?('./')
=> false

You're probably using 0.3.0. The Dir.empty? method was added in 0.3.1.
You can check the Dir::VERSION.

Regards,

Dan

I am using version 0.3.2

Checked it 3 ways

1. irb - non-conclusive

C:\Documents and Settings\Owner>irb
irb(main):001:0> require 'win32/dir'
=> true
irb(main):002:0> Dir::VERSION
(irb):2: warning: toplevel constant VERSION referenced by Dir::VERSION
=> "1.8.6"

2. extra from rdoc on my system

Class Dir
In: lib/win32/dir.rb

Parent: Object

Methods
create_junction empty? junction?
Included Modules
Windows::Directory Windows::Shell Windows::Error Windows::File
Windows::DeviceIO
Constants
VERSION = '0.3.2'


3. gem list

C:\Documents and Settings\Owner>gem query -n win32-dir

*** LOCAL GEMS ***

win32-dir (0.3.2)
Extra constants and methods for the Dir class on Windows.


It may have been placed in version 0.3.1 but it is not in version
0.3.2
 
B

Bertram Scharpf

Hi,

Am Mittwoch, 15. Aug 2007, 01:37:00 +0900 schrieb John Joyce:
Sorry Bertram!! I didn't mean to hurt you!
Maybe I was thinking of "Never Ending Story"

In the last days I had removed a bunch of memory leaks and
documentation bugs of another open source project and the
developers there only charged me not to have obeyed some
formalities. Further I have to cope with a spam flood of
some thousands. That all seems it has been too much; I'm a
bit nervous. Please understand.

Bertram
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,156
Latest member
KetoBurnSupplement
Top