From 807a93be080e97dafb31f4d975b6eaa991070961 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 7 Dec 2004 18:26:12 +0000 Subject: * 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 --- test/ruby/test_super.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test/ruby/test_super.rb') 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 -- cgit v1.2.3