From: Brian Candler on
defined? does appear to be a rather odd beast though. You'd have to dig
hard through the source to explain the following (which I'm not going to
try):

>> defined?(1)
=> "expression"
>> defined?(1+2)
=> "method"

This is with:

>> RUBY_VERSION
=> "1.8.7"
>> RUBY_PATCHLEVEL
=> 174
--
Posted via http://www.ruby-forum.com/.

First  |  Prev  | 
Pages: 1 2 3 4
Prev: DXF Writer?
Next: System handling of undef_method