mirror of
https://github.com/ruby/ruby.git
synced 2025-09-24 04:54:01 +02:00
* class.c (check_mix_method_i, do_mix_method_i): not mix methods
renamed as nil. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a8009c20d9
commit
40930b7144
3 changed files with 22 additions and 0 deletions
|
@ -1096,5 +1096,20 @@ class TestModule < Test::Unit::TestCase
|
|||
mix japanese, :address => :jp_address, :address= => :jp_address=
|
||||
}
|
||||
}
|
||||
|
||||
japanese_american = Class.new
|
||||
assert_nothing_raised(ArgumentError) {
|
||||
japanese_american.class_eval {
|
||||
mix japanese, :address => nil, :address= => nil
|
||||
}
|
||||
}
|
||||
assert_raise(NoMethodError) {
|
||||
japanese_american.new.address
|
||||
}
|
||||
assert_nothing_raised(ArgumentError) {
|
||||
japanese_american.class_eval {
|
||||
mix american
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue