Why is irb different from script file?


#1

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^^

##################