Я пытаюсь выучить Руби с помощью Коанов, но я застрял на 6-м шаге.
Вот код:
def test_you_dont_get_null_pointer_errors_when_calling_methods_on_nil
# What happens when you call a method that doesn't exist.
# The following begin/rescue/end code block captures the exception and
# make some assertions about it.
begin
nil.some_method_nil_doesnt_know_about
rescue Exception => ex
# What exception has been caught?
assert_equal __, ex.class
# What message was attached to the exception?
# (HINT: replace __ with part of the error message.)
assert_match(/__/, ex.message)
end
end
Я знаю, что должен заменить __ чем-то, что связано с сообщением об ошибке "NoMethodError", но я не могу понять это,
Это сообщение об ошибке, которое я получаю, когда запускаю «path_to_enlightenment.rb»:
The answers you seek...
<"FILL ME IN"> expected but was <NoMethodError>.
Я был бы очень признателен за это - это сводит меня с ума!Я хотел бы знать ответ и возможное объяснение.Спасибо!