Looking into it a little bit further, it seems as though any call to
first returns an Array rather than a single object or nil. Is this the
desired behaviour? It's certainly not what I would have expected.
Here's a possible fix (again I seem to be unable to create a
lighthouse account):
Index: ambition-0.5.0/lib/ambition/api.rb
===================================================================
--- ambition-0.5.0/lib/ambition/api.rb (revision 36)
+++ ambition-0.5.0/lib/ambition/api.rb (working copy)
@@ -37,7 +37,7 @@
def first(count = 1)
sliced = slice(0, count)
- count == 1 ? sliced.kick : sliced
+ count == 1 ? sliced.kick.first : sliced
end
def each(&block)