{"id":1042,"date":"2022-08-30T15:11:25","date_gmt":"2022-08-30T15:11:25","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/why-are-these-ruby-method-calls-not-equivalent-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:11:25","modified_gmt":"2022-08-30T15:11:25","slug":"why-are-these-ruby-method-calls-not-equivalent-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/why-are-these-ruby-method-calls-not-equivalent-collection-of-common-programming-errors\/","title":{"rendered":"Why are these Ruby method calls not equivalent?-Collection of common programming errors"},"content":{"rendered":"<p>programming-amp-design Retrieving original web address<br \/>\ndiscoverer: Blake <img decoding=\"async\" src=\"http:\/\/l.yimg.com\/sc\/28222\/answers2\/images\/a\/i\/identity\/nopic_48.png\" \/> I&#8217;m learning Ruby and this tutorial I&#8217;m using says that these method calls are all equivalent but when I run it I get this error: Ruby_tests\/method_diff.rb:6:in &#8221;: undefined method &#8216;sayGoodnight&#8217; for main:Object Here is the code from the tutorial: puts sayGoodnight &#8220;John-Boy&#8221; puts sayGoodnight(&#8220;John-Boy&#8221;) puts(sayGoodnight &#8220;John-Boy&#8221;)<\/p>\n<p>puts(sayGoodnight(&#8220;John-Boy&#8221;))<\/p>\n<ol>\n<li>\n<p>Have you, in fact, defined the &#8216;sayGoodnight&#8217; function?<\/p>\n<\/li>\n<\/ol>\n<p>Source of the problem\uff1a answers.yahoo<\/p>\n<p>Web site is in building<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-09 23:17:48. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>programming-amp-design Retrieving original web address discoverer: Blake I&#8217;m learning Ruby and this tutorial I&#8217;m using says that these method calls are all equivalent but when I run it I get this error: Ruby_tests\/method_diff.rb:6:in &#8221;: undefined method &#8216;sayGoodnight&#8217; for main:Object Here is the code from the tutorial: puts sayGoodnight &#8220;John-Boy&#8221; puts sayGoodnight(&#8220;John-Boy&#8221;) puts(sayGoodnight &#8220;John-Boy&#8221;) puts(sayGoodnight(&#8220;John-Boy&#8221;)) Have [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1042","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1042","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1042"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1042\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1042"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1042"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1042"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}