草庐IT

EdgeCase

全部标签

ruby - 停留在 EdgeCase Ruby Koans 上的 about_methods.rb

我正在通过EdgeCaseRubyKoans(www.rubykoans.com)进行黑客攻击,并且卡在about_methods.rbhere中从第35行开始的方法上。.运行rake可预见地失败并告诉我查看第36行。我有理由确定我的assert_match是正确的(“0代表2”),但我不知道是什么失败了。assert_raise(___)行很可能应该在括号之间包含一些内容,但我不知道那应该是什么。任何提示或轻推?非常感谢。编辑:这是有问题的代码的一小段:defmy_global_method(a,b)a+bend-剪辑-deftest_calling_global_methods_w

RubyKoans : broken koan?

可能是一个业余爱好者的标志,我想知道问题是不是公案(而不是我),但是,考虑一下这个公案deftest_calling_global_methods_without_parenthesesresult=my_global_method2,3assert_equal__,resultend注意,my_global方法是defmy_global_method(a,b)a+bend这是它在终端给我的提示Theanswersyouseek...expectedbutwas.我也是这样deftest_calling_global_methods_without_parenthesesresult=