diff options
author | José Valim <jose.valim@gmail.com> | 2010-09-27 20:42:02 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-27 20:43:56 +0200 |
commit | 6067d1620075c1c311bbae01993453cd80967804 (patch) | |
tree | a6bbb495255db6e4fd30e8209316a768b5691350 /activesupport | |
parent | e1b51955f15e91f3f1705612fd0aca82a257e2f4 (diff) | |
download | rails-6067d1620075c1c311bbae01993453cd80967804.tar.gz rails-6067d1620075c1c311bbae01993453cd80967804.tar.bz2 rails-6067d1620075c1c311bbae01993453cd80967804.zip |
Call it compile_methods! and do the same on AM.
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/configurable.rb | 6 | ||||
-rw-r--r-- | activesupport/test/configurable_test.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/configurable.rb b/activesupport/lib/active_support/configurable.rb index 1914f10669..58ed37b018 100644 --- a/activesupport/lib/active_support/configurable.rb +++ b/activesupport/lib/active_support/configurable.rb @@ -10,12 +10,12 @@ module ActiveSupport extend ActiveSupport::Concern class Configuration < ActiveSupport::InheritableOptions - def crystalize! - self.class.crystalize!(keys.reject {|key| respond_to?(key)}) + def compile_methods! + self.class.compile_methods!(keys.reject {|key| respond_to?(key)}) end # compiles reader methods so we don't have to go through method_missing - def self.crystalize!(keys) + def self.compile_methods!(keys) keys.each do |key| class_eval <<-RUBY, __FILE__, __LINE__ + 1 def #{key}; _get(#{key.inspect}); end diff --git a/activesupport/test/configurable_test.rb b/activesupport/test/configurable_test.rb index 4f288eb4d5..9c773c1944 100644 --- a/activesupport/test/configurable_test.rb +++ b/activesupport/test/configurable_test.rb @@ -49,7 +49,7 @@ class ConfigurableActiveSupport < ActiveSupport::TestCase assert !child.config.respond_to?(:bar) assert !child.new.config.respond_to?(:bar) - parent.config.crystalize! + parent.config.compile_methods! assert_equal :foo, parent.config.bar assert_equal :foo, child.new.config.bar |