Call and Responce


#1

I don;t understand the value of this method?
If I say "26" it will return true just like an int 26 does so it's no good to tell if int. Does this call ever get used (except maybe extremely rarely)?


https://www.codecademy.com/courses/ruby-beginner-en-1o8Mb/2/3?curriculum_id=5059f8619189a5000201fbcb


age = 26

"23".respond_to?(:next)


#2

Not sure what you're asking.

If you are asking what the return value of that method signifies, then here's some documentation for it:
http://ruby-doc.org/core-2.3.1/Object.html#method-i-respond_to-3F


#3

Sorry, didn't mean "value". I meant I don't know what this is good for since both "27" and 27 will return the same boolean answer.


#4

Any reason why it shouldn't?

I get the feeling that you haven't nailed down what that method does, and that makes me wonder why you're asking the question you're asking. SOMETHING isn't adding up, and it is probably cleared up by reading that documentation.

Keep asking if it doesn't, but you'll have to explain why you think something is strange if you want it explained, otherwise you're asking a very broad question. Better to be precise about what you want to know, it's not a guessing game.


#7