lib/core/facets/array/only.rb in facets-2.4.5 vs lib/core/facets/array/only.rb in facets-2.5.0
- old
+ new
@@ -5,11 +5,10 @@
#
# [5].only # -> 5
# [1,2,3].only # -> IndexError
# [].only # -> IndexError
#
- # CREDIT: Gavin Sinclair
- # CREDIT: Noah Gibbs
+ # CREDIT: Gavin Sinclair, Noah Gibbs
def only
unless size == 1
raise IndexError, "Array#only called on non-single-element array"
end