Why is irb different from script file?

## 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^^
##################
--
Posted via http://www.ruby-forum.com/\.