From b0da0dd8345b68a4e54c52e398cc65bbc0c4fbb5 Mon Sep 17 00:00:00 2001 From: Diego Carrion Date: Sat, 19 Feb 2011 21:13:07 -0200 Subject: added Range#count? for Ruby 1.8 Signed-off-by: Santiago Pastorino --- activesupport/lib/active_support/core_ext/range/cover.rb | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 activesupport/lib/active_support/core_ext/range/cover.rb (limited to 'activesupport/lib/active_support/core_ext/range/cover.rb') diff --git a/activesupport/lib/active_support/core_ext/range/cover.rb b/activesupport/lib/active_support/core_ext/range/cover.rb new file mode 100644 index 0000000000..3a182cddd2 --- /dev/null +++ b/activesupport/lib/active_support/core_ext/range/cover.rb @@ -0,0 +1,3 @@ +class Range + alias_method(:cover?, :include?) unless instance_methods.include?(:cover?) +end -- cgit v1.2.3