lib/hobo_support/hash.rb in hobosupport-0.8.10 vs lib/hobo_support/hash.rb in hobosupport-0.9.0
- old
+ new
@@ -111,7 +111,11 @@
end
if defined? ActiveSupport
class ActiveSupport::OrderedHash
alias each_pair each
+
+ def first
+ empty? ? nil : [keys.first, values.first]
+ end
end
end