From 8cc61c8dd9c0666323b5a2be5ae40ee0c7f5d3f4 Mon Sep 17 00:00:00 2001 From: mislav Date: Fri, 18 May 2007 10:26:06 +0000 Subject: [PATCH] Namespacing issue with Hash, now #slice works fine [#17 state:resolved] git-svn-id: svn://errtheblog.com/svn/plugins/will_paginate@223 1eaa51fe-a21a-0410-9c2e-ae7a00a434c4 --- init.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.rb b/init.rb index a5edd815a..2babe2d28 100644 --- a/init.rb +++ b/init.rb @@ -1,8 +1,8 @@ ActiveRecord::Base.send :include, WillPaginate::Finder ActionView::Base.send :include, WillPaginate::ViewHelpers -unless Hash.new.respond_to? :slice - class Hash +unless ::Hash.new.respond_to? :slice + class ::Hash # Returns a new hash with only the given keys. def slice(*keys) allowed = Set.new(respond_to?(:convert_key) ? keys.map { |key| convert_key(key) } : keys)