lib/gettext/class_info.rb in gettext-3.0.2 vs lib/gettext/class_info.rb in gettext-3.0.3
- old
+ new
@@ -1,17 +1,13 @@
# -*- coding: utf-8 -*-
-require 'locale/util/memoizable'
-
module GetText
# For normalize/finding the related classes/modules.
# This is used for realizing the scope of TextDomain.
# (see: http://www.yotabanana.com/hiki/ruby-gettext-scope.html)
module ClassInfo
extend self
- include Locale::Util::Memoizable
-
# normalize the class name
# klass should kind of the class, not object.
def normalize_class(klass)
ret = (klass.kind_of? Module) ? klass : klass.class
if ret.name =~ /^\#<|^$/ or ret == GetText or ret.name.nil?
@@ -21,11 +17,10 @@
end
def root_ancestors # :nodoc:
Object.ancestors
end
- memoize :root_ancestors
# Internal method for related_classes.
def related_classes_internal(klass, all_classes = [], analyzed_classes = [] )
ret = []
klass = normalize_class(klass)
@@ -62,8 +57,7 @@
unless ret.include? Object
ret += [Object]
end
ret
end
- memoize :related_classes
end
end