Topic: Proc === method
So the Proc documentation says:
prc === obj → result_of_proc
Invokes the block, with obj as the block‘s parameter. It is to allow a proc object to be a target of when clause in the case statement.
and I wanted to test this out:
case Proc.new { "hello"}
when "hello"
puts "greeting received"
else
puts "some other message"
endBut I get "some other message"... I thought it is saying the Proc will be called when it's used with a case statement? Am I misunderstanding the documentation?
-patrick