1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/test/test_delegate.rb
akr 796d005a23 add a test for [ruby-dev:34808].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-05-24 01:34:37 +00:00

20 lines
453 B
Ruby

require 'test/unit'
require 'delegate'
class TestDelegateClass < Test::Unit::TestCase
module M
attr_reader :m
end
def test_extend
obj = DelegateClass(Array).new([])
obj.instance_eval { @m = :m }
obj.extend M
assert_equal(:m, obj.m, "[ruby-dev:33116]")
end
def test_systemcallerror_eq
e = SystemCallError.new(0)
assert((SimpleDelegator.new(e) == e) == (e == SimpleDelegator.new(e)), "[ruby-dev:34808]")
end
end