lib/ludy/array/choice.rb in ludy-0.1.13 vs lib/ludy/array/choice.rb in ludy-0.1.15

- old
+ new

@@ -3,10 +3,10 @@ class Array # it would be defined if RUBY_VERSION < '1.9.0', see rdoc in ruby 1.9 def choice self[rand(size)] - end if Ludy::ruby_before '1.9.0' + end unless method_defined?(:choice) # the choosen element would be deleted. return the choosen def choice! i = rand size r = self[i] self.delete_at i