Email or username:

Password:

Forgot your password?
Sam Schlinkert

I'm getting a rather embarrassing Ruby error when I run this and can't figure out why...

solve.rb:1:in `what_colors_can_contain_this_color': wrong number of arguments (given 1, expected 2) (ArgumentError)

github.com/sts10/advent-of-cod

1 comment
Eugen Rochko

@schlink You call the method recursively without specifying the 2nd argument (a_big_hash). I haven't read too much into it but you'll either want to pass on the hash from the outside or make the argument optional by defaulting it to an empty hash (def foo(optional_hash = {}))

Go Up