Block help


#1



NO link just a problem.

arr = [1,2,3,4]

def to_str(arg_1)
puts"We are now converting array into string array.!"
proc = Proc.new{|o| o.map}
proc.call(arg_1.to_s)

end

to_str(arr)

The goal here was to use a proc to map a new array that was a string using the block but it wont go through can someone tell me what i did wrong?


Replace this line with your code.


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.