From 7555073803ffb455715b74664a0cfb48c271fe89 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 28 Dec 2007 05:42:12 +0000 Subject: Ruby 1.9 compat: introduce instance_variable_names. Closes #10630 [Frederick Cheung] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8499 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/test/core_ext/object_and_class_ext_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activesupport/test/core_ext/object_and_class_ext_test.rb') diff --git a/activesupport/test/core_ext/object_and_class_ext_test.rb b/activesupport/test/core_ext/object_and_class_ext_test.rb index f885d94be3..09a86721dd 100644 --- a/activesupport/test/core_ext/object_and_class_ext_test.rb +++ b/activesupport/test/core_ext/object_and_class_ext_test.rb @@ -182,6 +182,10 @@ class ObjectInstanceVariableTest < Test::Unit::TestCase @source.instance_variable_set(:@baz, 'baz') end + def test_instance_variable_names + assert_equal %w(@bar @baz), @source.instance_variable_names.sort + end + def test_instance_variable_defined assert @source.instance_variable_defined?('@bar') assert @source.instance_variable_defined?(:@bar) -- cgit v1.2.3