From 001c8beb4d0999a858a8b52ad511ee1251cc3517 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 14 Jul 2008 20:02:59 -0500 Subject: memorize typo --- activesupport/lib/active_support/memoizable.rb | 6 +++--- activesupport/test/memoizable_test.rb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/memoizable.rb b/activesupport/lib/active_support/memoizable.rb index c78fb0a793..65feca363a 100644 --- a/activesupport/lib/active_support/memoizable.rb +++ b/activesupport/lib/active_support/memoizable.rb @@ -5,8 +5,8 @@ module ActiveSupport end module ClassMethods - def memorize(symbol) - original_method = "_unmemorized_#{symbol}" + def memoize(symbol) + original_method = "_unmemoized_#{symbol}" alias_method original_method, symbol class_eval <<-EOS, __FILE__, __LINE__ def #{symbol} @@ -22,7 +22,7 @@ module ActiveSupport def freeze methods.each do |method| - if m = method.to_s.match(/^_unmemorized_(.*)/) + if m = method.to_s.match(/^_unmemoized_(.*)/) send(m[1]).freeze end end diff --git a/activesupport/test/memoizable_test.rb b/activesupport/test/memoizable_test.rb index 40a02cf253..1b6cec2b2f 100644 --- a/activesupport/test/memoizable_test.rb +++ b/activesupport/test/memoizable_test.rb @@ -8,12 +8,12 @@ uses_mocha 'Memoizable' do def name fetch_name_from_floppy end - memorize :name + memoize :name def age nil end - memorize :age + memoize :age private def fetch_name_from_floppy -- cgit v1.2.3