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.
You are correct. names.sort! will modify the original list, which is probably not what is desired by this method.
Yeah, cbean, that's a bug that I also came across -- it strips out anything that looks like an XML tag. That sucks, because assigning matched groups to variables is one of my favorite Ruby regex features!
As far as I'm aware, this will also change the array passed into the function, rather than just returning a sorted version.
Hmm, I just tested it in irb. Looks like when you subtract two objects from the Time class, the difference is a float.
1.9.3p429 :007 > start_time = Time.new(2000, 1, 1, 0, 0, 1) ; end_time = Time.new(2000, 1, 1, 0, 0, 2) ; (start_time - end_time).class
=> Float
Yep, that was the prob -- I was uppercasing the first word. Thanks!
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Apologies, I was returning a string instead of just the matched variable. All's good.
Looks like the comments strip out greater/less than symbols. Here's the full function that's working locally for me (I think!): http://pastebin.com/t0czVp7V
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