100 doors: Difference between revisions
Content deleted Content added
→{{header|Ruby}}: Added another option demonstrating Range#step. |
→{{header|Ruby}}: minor tweak to comment and output of last solution |
||
Line 2,807: | Line 2,807: | ||
</lang> |
</lang> |
||
'''generic true/false, with another way of handling the inner loop demonstrating Range#step''' |
|||
<lang ruby> |
<lang ruby> |
||
doors = [false] * 100 |
doors = [false] * 100 |
||
Line 2,815: | Line 2,815: | ||
end |
end |
||
end |
end |
||
puts doors.inspect |
|||
</lang> |
</lang> |