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.
My current code uses
w[1..-1]
(as a workaround) notw[1..]
. As stated in my previous comment, it'd be nice to know what the discrepancy is...I see the problem mentioned with the map, although that's not the entirety of my concern. (I guess I'll try to avoid the "issues" button unless someone tells me otherwise.) However, Is there something going on with
w[1..]
not working for the kata or an issue with my local ruby perhaps being a different version than the website's?Okay, i removed the "issue" flag and, though my biggest issue was that it produced errors referencing lines and code that had nothing to do with what I provided, i'll avoid the issues button. I'm new to this site so please let me know at what point it is advisable to touch the "issue" button.
Edit: also I'm not sure how to make sense of your comment.
"".downcase
is valid Ruby to run on a string and passes the initial test. Unless I am drastically mistaken here, I assumed that the arguments used in both the initial test and the tests used on submisssion would be strings.This comment is hidden because it contains spoiler information about the solution
I'm encountering numerous problems with this kata in Ruby. It works fine when I run the code in IRB, but it generates bizarre syntax errors or just doesn't run the important code that does string mangling. Not sure what's going on. I'll post more specifics in a reply so this can stay spoiler-free....
This answer blows my mind, but i think it's worth having a caveat: it only works if the supplied numbers match the scenario where one-and-only-one number is used an odd number of times. If multiple numbers are used an odd number of times or all numbers are used an even number of timees, then you'll get a seemingly random number and not be able to determine what is what...
Is this code bugged in Ruby? Running "test" only runs one test (which it passed). I had to manually check every listed test, which all match. But when I try to submit, it fails...something...