Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the solution to this blank in the code?

Tags:

ruby

koan

This is from the test_symbols_cannot_be_concatenated exercise in the Ruby Koans. Previous exercises had used assert_equal tests. This is the first assert_raise on the path to enlightenment.

def test_symbols_cannot_be_concatenated

  assert_raise(_____) do
    :cats + :dogs
  end
end
like image 228
Pisto Avatar asked Nov 19 '25 00:11

Pisto


1 Answers

NoMethodError I guess, since it makes no sense to try to sum or catenate two symbols.

like image 102
noodl Avatar answered Nov 20 '25 18:11

noodl



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!