Help please


floats = [1.2, 3.45, 0.91, 7.727, 11.42, 482.911]

Write your code below this line!

    round_down = proc.New {|o| o.floor }

Write round_down = proc.New {|o| o.floor }your code above this line!

ints = floats.collect(&round_down)

Theres the code i inputed and its telling me it don't look right, Can someone tell me what im doing wrong? heres the link to the problem.


Your capitalization is off, you typed "proc.New," and what you need to type is "" Otherwise your code should work just fine.


Hi tried that and now its telling me tried to create a proc object without a block. =(


Odd. I didn't encounter that error at all. This is my code exactly, and it functions the way it's supposed to. Compare yours to mine, and maybe you can spot an error.
floats = [1.2, 3.45, 0.91, 7.727, 11.42, 482.911]

round_down = {|n| n.floor}

ints = floats.collect(&round_down)

now that I look more closely at what you posted, it looks like you put a line of code inside a comment.


I spotted the error. The proc was'nt capitalized....Thank you so much.


round_down = { |x| x.floor }
the Proc should be on capital.


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