Forum: Ruby Why is irb different from script file?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Cda3d26c2566666a0f507073b1389628?d=identicon&s=25 Kyung won Cheon (kdream95)
on 2008-10-23 08:37
## in irb

>> def why?
>> end
=> nil
>> Object.public_instance_methods.include?("why?")
=> true


## in test.rb

def why?
end
p Object.private_instance_methods.include?("why?")  # => true



##################
# Help Me^^
##################
This topic is locked and can not be replied to.