diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_alias.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_alias.rb b/test/ruby/test_alias.rb index 0fd8d5f89b..32aa92a8d9 100644 --- a/test/ruby/test_alias.rb +++ b/test/ruby/test_alias.rb @@ -1,4 +1,5 @@ require 'test/unit' +require_relative 'envutils' class TestAlias < Test::Unit::TestCase class Alias0 @@ -119,4 +120,16 @@ class TestAlias < Test::Unit::TestCase def test_super_in_aliased_module_method # fails in 1.8 assert_equal([:Base, :M], SuperInAliasedModuleMethod::Derived.new.bar) end + + def test_alias + assert_normal_exit %q{ + require 'stringio' + GC.verify_internal_consistency + GC.start + class StringIO + alias_method :read_nonblock, :sysread + end + GC.verify_internal_consistency + } + end end |