Vidyalelo
Ruby Programming · Q4

Blocks and Procs in Ruby

Programming · Ruby Programming · question 4

Q4

How do you create a proc in Ruby?

A.
By using the create_proc function
B.
Using the Proc.new method or the -> (stabby lambda) syntax
Answer
C.
By invoking the proc keyword followed by parentheses ()
D.
None of the above

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board