diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-07 18:26:12 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-12-07 18:26:12 +0000 |
commit | 807a93be080e97dafb31f4d975b6eaa991070961 (patch) | |
tree | ba7f8844d21df77edd40d61a35761b4c45414eaa /test/ruby/test_super.rb | |
parent | d5b434088ada94b3df3fe87ea42c98c3e6e9ee16 (diff) | |
download | ruby-807a93be080e97dafb31f4d975b6eaa991070961.tar.gz |
* test/io/nonblock/test_flush.rb (TestIONonblock#test_flush): write
operation ignores EAGAIN.
* test/ruby/test_super.rb (TestSuper#test_define_method): test for
super from proc. [ruby-core:03856]
* test/socket/test_tcp.rb (TestTCPSocket#test_recvfrom): make
execution order more precise.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_super.rb')
-rw-r--r-- | test/ruby/test_super.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/ruby/test_super.rb b/test/ruby/test_super.rb index ec0f8b608e..16b623df61 100644 --- a/test/ruby/test_super.rb +++ b/test/ruby/test_super.rb @@ -65,4 +65,24 @@ class TestSuper < Test::Unit::TestCase assert_equal([1,2,3], Array4.new.array(1, 2, 3)) assert_equal([1,2,3,4], Array4.new.array(1, 2, 3, 4)) end + + class A + def tt(aa) + "A#tt" + end + + def uu(a) + class << self + define_method(:tt) do |sym| + super + end + end + end + end + + def test_define_method # [ruby-core:03856] + a = A.new + a.uu(12) + assert_raise(RuntimeError) {a.tt(12)} + end end |