我在 RubyKoans.com 上工作,并被about_symbols.rb
这个公案困住了。
这是测试:我想我应该在括号中放一些东西,assert_raise()
但我不知道:
def test_symbols_cannot_be_concatenated
# Exceptions will be pondered further father down the path
assert_raise(___) do
:cats + :dogs
end
end
这是终端中的提示:
The answers you seek...
[FillMeInError] exception expected, not Class: <NoMethodError> Message: <"undefined method `+' for :cats:Symbol"> ---Backtrace--- /Users/mm/Sites/koans/about_symbols.rb:89:in `block in test_symbols_cannot_be_concatenated' ---------------