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 am translating a Kata into Ruby, and need to disable the use of certain operators. What is the best way to go about this?
It's not an issue for the kata but rather for CW and for you. I saw in your post below that you resolved your problem by running your code in a terminal. Do you run your code directly at CW? First thing to do: running your code in your machine; second: when you don't pass the tests look carefully at your program before thinking that there is something wrong in the tests. Think that in the last run of a loop the last white space could be too much.
I consider the issue as resolved but you could send a bug report at CW in order that they better show white spaces.
@bkaes: good idea but a bit too late for current-next kata:-(
Found the issue. I had an extra space. The test output was condensing the white space, so 2 spaces appeared to be 1.
I diagnosed the issue by running my code in the terminal with a "puts" statement.
After correcting the white space, my code passed all tests.
Tests are too dependent on white space being correct.
It is difficult to diagnose a white space issue because the test output apparently removes extra white space.
Here is an example:
In the above example, my code had an additional space before the semicolon, but the test output makes the actual and expected values appear identical.
That doesn't solve the underlying error. However, @JTorr needs to share her current solution. Maybe it's not the whitespace, but something else. Also, AFAIK, Jake needs an example in order to fix #55.
Slightly off-topic: an array of objects would be much more idiomatic in JS (other languages have similar features), like
What about putting something like "-" instead of whitespaces in the resulting string?
Ahem. You remember the discussion we just had over there on the other kata? :>. That's the other reason I don't like strings: You don't see whitespace errors in the output. One should probably file an issue (and I should add this drawback to the guide). Edit: It's already filed.
I can't see any difference! Which language? Did you try several times? CW seems to have too much to do.
My tests are failing even though the strings appear to match. I have even compared the string using the tool at http://www.textdiff.com/, and the strings show that they match.
Here is the failure message:
Here's the output again, lined up for easy comparison:
What am I missing?