πŸ“Š Ruby
Q. What does the & operator do when used with a proc in Ruby?
  • (A) Invokes the proc with the given arguments
  • (B) Converts the proc into a lambda so it can be passed to a method that expects a lambda parameter
  • (C) Converts the proc into a block so it can be passed to a method that expects a block parameter
  • (D) Converts the proc into a method so it can be called directly
πŸ’¬ Discuss
βœ… Correct Answer: (C) Converts the proc into a block so it can be passed to a method that expects a block parameter

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
233
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
85%
Success Rate