diff options
Diffstat (limited to 'test/ruby/test_object.rb')
-rw-r--r-- | test/ruby/test_object.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_object.rb b/test/ruby/test_object.rb index 5190eb69e5..2116c6a216 100644 --- a/test/ruby/test_object.rb +++ b/test/ruby/test_object.rb @@ -170,6 +170,13 @@ class TestObject < Test::Unit::TestCase assert_raise(NameError) { o.instance_variable_defined?(:foo) } end + def test_remove_instance_variable + o = Object.new + o.instance_eval { @foo = :foo } + o.instance_eval { remove_instance_variable(:@foo) } + assert_equal(false, o.instance_variable_defined?(:@foo)) + end + def test_convert_type o = Object.new def o.to_s; 1; end |