aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/object_and_class_ext_test.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-12-28 05:42:12 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-12-28 05:42:12 +0000
commit7555073803ffb455715b74664a0cfb48c271fe89 (patch)
treec3729911796be98a9ad48c5bee6da6402f050ffb /activesupport/test/core_ext/object_and_class_ext_test.rb
parent16558f6dd83d514f783ed13e9bc24d6b66e5aefd (diff)
downloadrails-7555073803ffb455715b74664a0cfb48c271fe89.tar.gz
rails-7555073803ffb455715b74664a0cfb48c271fe89.tar.bz2
rails-7555073803ffb455715b74664a0cfb48c271fe89.zip
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
Diffstat (limited to 'activesupport/test/core_ext/object_and_class_ext_test.rb')
-rw-r--r--activesupport/test/core_ext/object_and_class_ext_test.rb4
1 files changed, 4 insertions, 0 deletions
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)