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.
I will make note for Ruby ;)
Earlier katas stated whether your function was expected to be pure, or whether the author actually copied the arguments beforehand. So @Hybr1d, you probably want to add this to the description. although this only effects Ruby (AFAIK).
t
isn't a copy, but actually references the very same object asdna
. See http://patshaughnessy.net/2012/1/18/seeing-double-how-ruby-shares-string-values for another example.Try not to manipulate given String because test ares testing the opposite then. Since you manipulted it :). Create new String and return that.
PS: If you still have trouble look online if not enoguh then just pass solution and you will see what you did wrong ;)
Oh... don't change the actual input create new string and add to it :). Then it works... like bkeas told you
Does your solution manipulate the argument? Your function needs to be pure, e.g. it may have no side-effects on the argument or the environment. As far as I can see, you change
dna
inplace, therefore invalidating the argument used for the verification.To be honest I have no idea why...But test work for me just fine post solutin here I will mark it as a spoiler...
Tell me what is wrong, the test seems fine for me?