diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-05-01 13:34:07 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-05-01 13:34:31 -0700 |
commit | c699a4daf1d496fe6d902c845a4d4c108dda3a6b (patch) | |
tree | 320db660a57b1d4e2acda74ac95f5a280de5f605 /activesupport/test | |
parent | 1f2a4b37accc023c96148d54d8daa3a751446c44 (diff) | |
download | rails-c699a4daf1d496fe6d902c845a4d4c108dda3a6b.tar.gz rails-c699a4daf1d496fe6d902c845a4d4c108dda3a6b.tar.bz2 rails-c699a4daf1d496fe6d902c845a4d4c108dda3a6b.zip |
Ruby 1.9 compat: compatibility wrapper for new Module#const_defined? behavior
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/inflector_test.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/activesupport/test/inflector_test.rb b/activesupport/test/inflector_test.rb index 00d8f45028..26af245ff7 100644 --- a/activesupport/test/inflector_test.rb +++ b/activesupport/test/inflector_test.rb @@ -120,14 +120,8 @@ class InflectorTest < Test::Unit::TestCase assert_raises(NameError) { Inflector.constantize("InvalidClass\n") } end - if RUBY_VERSION < '1.9.0' - def test_constantize_does_lexical_lookup - assert_raises(NameError) { Inflector.constantize("Ace::Base::InflectorTest") } - end - else - def test_constantize_does_dynamic_lookup - assert_equal self.class, Inflector.constantize("Ace::Base::InflectorTest") - end + def test_constantize_does_lexical_lookup + assert_raises(NameError) { Inflector.constantize("Ace::Base::InflectorTest") } end def test_ordinal |