lib/muflax/array.rb in muflax-0.3.6 vs lib/muflax/array.rb in muflax-0.3.7
- old
+ new
@@ -14,10 +14,15 @@
end
end
end
# silly accessors
- def second ; self[1] ; end
- def third ; self[2] ; end
- def fourth ; self[3] ; end
- def fifth ; self[4] ; end
+ def second ; self[1] ; end
+ def third ; self[2] ; end
+ def fourth ; self[3] ; end
+ def fifth ; self[4] ; end
+
+ def rfind *arg, &block
+ i = self.rindex(*arg, block)
+ i.nil? ? nil : self[i]
+ end
end