summaryrefslogtreecommitdiff
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
commit329484693ae6d9dab6e01675faf7b535c2783a83 (patch)
treee831796a4899b7d86c4ac76e07118f3c9f4d4035 /bootstraptest/test_method.rb
parent724de18989353b277b175e56ef69b78ec339510a (diff)
* 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: svn+ssh://ci.ruby-lang.org/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 76901f6..7c2d665 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