aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/memoizable.rb6
-rw-r--r--activesupport/test/memoizable_test.rb4
2 files changed, 5 insertions, 5 deletions
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