summaryrefslogtreecommitdiffstats
path: root/bootstraptest/test_method.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-27 01:02:30 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-27 01:02:30 +0000
commitb9e90701385c7a933843bfea97397c99b1a34600 (patch)
treee831796a4899b7d86c4ac76e07118f3c9f4d4035 /bootstraptest/test_method.rb
parentef893a523089395d6598fb2e79e979cdcef44081 (diff)
downloadruby-b9e90701385c7a933843bfea97397c99b1a34600.tar.gz
ruby-b9e90701385c7a933843bfea97397c99b1a34600.tar.xz
ruby-b9e90701385c7a933843bfea97397c99b1a34600.zip
* insns.def, compile.c: fix to allow dsym for alias/undef.
[ruby-dev:32355] * bootstraptest/test_method.rb: add tests for above. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest/test_method.rb')
-rw-r--r--bootstraptest/test_method.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/bootstraptest/test_method.rb b/bootstraptest/test_method.rb
index 76901f6f6..7c2d6652a 100644
--- a/bootstraptest/test_method.rb
+++ b/bootstraptest/test_method.rb
@@ -230,6 +230,28 @@ assert_equal '1', %q( class A; def a() end end # [yarv-dev:999]
end
begin B.new.b; rescue NoMethodError; 1 end )
+assert_equal '3', %q{
+ def m1
+ 1
+ end
+ alias m2 m1
+ alias :"#{'m3'}" m1
+ m1 + m2 + m3
+}, '[ruby-dev:32308]'
+assert_equal '1', %q{
+ def foobar
+ end
+ undef :"foo#{:bar}"
+ 1
+}, '[ruby-dev:32308]'
+assert_equal '1', %q{
+ def foobar
+ 1
+ end
+ alias :"bar#{:baz}" :"foo#{:bar}"
+ barbaz
+}, '[ruby-dev:32308]'
+
# private
assert_equal '1', %q( class C
def m() mm() end