1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* vm_method.c (rb_alias): fix a case which try non-existing method alias.

* test/ruby/test_alias.rb: add a test.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2009-07-16 08:44:23 +00:00
parent 53163f8138
commit b5dd85f049
3 changed files with 17 additions and 4 deletions

View file

@ -61,4 +61,12 @@ class TestAlias < Test::Unit::TestCase
}.call
assert_raise(SecurityError) { d.mm }
end
def test_nonexistmethod
assert_raise(NameError){
Class.new{
alias_method :foobarxyzzy, :barbaz
}
}
end
end