diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-23 02:03:51 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-23 02:03:51 +0000 |
commit | bedc6fdf8846a416b76cd6aa17b1d9cef47e82b6 (patch) | |
tree | 161c85af5c62b5e32ed5dfeaff6078fe7deaf4a6 /test | |
parent | 10cf7c5b2a079473db81af6dd3aad29dd779d8b1 (diff) |
vm_method.c: check if klass is 0
* vm_method.c (rb_method_entry_get_without_cache): me->klass is 0
for a method aliased in a module. [ruby-core:61636] [Bug #9663]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_alias.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/ruby/test_alias.rb b/test/ruby/test_alias.rb index 4e1db2e13f..dec61f6d63 100644 --- a/test/ruby/test_alias.rb +++ b/test/ruby/test_alias.rb @@ -179,4 +179,19 @@ class TestAlias < Test::Unit::TestCase assert_equal("ABC", c.new.foo, bug9475) end end + + def test_alias_in_module + bug9663 = '[ruby-core:61635] [Bug #9663]' + + assert_separately(['-', bug9663], <<-'end;') + bug = ARGV[0] + + m = Module.new do + alias orig_to_s to_s + end + + o = Object.new.extend(m) + assert_equal(o.to_s, o.orig_to_s, bug) + end; + end end |