From c699a4daf1d496fe6d902c845a4d4c108dda3a6b Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Thu, 1 May 2008 13:34:07 -0700 Subject: Ruby 1.9 compat: compatibility wrapper for new Module#const_defined? behavior --- activesupport/test/inflector_test.rb | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'activesupport/test') 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 -- cgit v1.2.3