extends: bring conjoin to Enumerable atj/master
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 29 Jun 2009 22:41:58 +0000 (00:41 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Mon, 29 Jun 2009 22:41:58 +0000 (00:41 +0200)
commit74d7d02ed07740e50c3f87da9ecedf13397729ea
tree997bcef26d27af87cf4181f843fec84511fc389a
parent561f183fb8c91867bade293c340a90a87a3b8c84
extends: bring conjoin to Enumerable

Put #conjoin() in the Enumerable module, so that it can be shared by all
enumerables (e.g. ranges). Since #size() is not necessarily present, its
use is replaced by #count(), the result of which is cached because
it can be slow on objects missing #size().
lib/rbot/core/utils/extends.rb