A

Admin • 828.03K Points
Coach

Q. What is the difference between a block and a proc in Ruby?

  • (A) A proc can be passed directly to methods, while a block needs to be converted into an object
  • (B) A proc is an anonymous function, while a block is a named function
  • (C) A block can be passed directly to methods, while a proc needs to be converted into an object
  • (D) A block is an anonymous function, while a proc is a named function
  • Correct Answer - Option(C)
  • Views: 8
  • Filed under category Ruby
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.