Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Ruby lets you specify default values for a method's arguments---values that will be used if the caller doesn't pass them explicitly. This is done using the assignment operator
=
.Nah, the other solution is why people love Ruby:
This solution is why Ruby is the best lang.
Wait, shouldn't you be asking the opposite question,
what's the benefit of using "==" over "==="?
?Because as everyone knows, you shouldn't be using
==
except in cases you know it won't get wrong.because name of method is 'always'
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Hi there, I'm not an expert in Ruby, but here you will find a very useful explanation on this matter.
https://blog.newrelic.com/2014/12/10/weird-ruby-2-rescue-interrupt-ensure/
I've hopefully answered your questions. I accidentally posted my reply as a sibling comment.
no 'self ===' it is String method === , '/\A\d\z/ ===' it is Regexp method ===
That is the splat operator - in this context - used for array coercion. You delve deeper here: https://endofline.wordpress.com/2011/01/21/the-strange-ruby-splat/
It's following the functional approach. Think recursively :)
thanks ;)
"the author" doesn't remember this specific kata, but it's quite possible I didn't know how to do something :). Fairly new to ruby.
try this: http://ruby-doc.org/core-2.2.0/String.html#method-i-5B-5D