diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-12 14:51:09 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-04-12 14:51:09 +0000 |
commit | db0c3eb8c02ef6a1c280c88260e10fb5c3f5be23 (patch) | |
tree | 0ed3c9c5109ac3679f13def125fe26c9cc1e16ca /bootstraptest | |
parent | 6b36f117f2c35474aa2e63ef56edba338e124d9d (diff) |
bootstraptest/test_knownbug.rb: add tests
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bootstraptest')
-rw-r--r-- | bootstraptest/test_knownbug.rb | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index 5ffd99a8ea..7a3b5476e9 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -110,3 +110,48 @@ assert_equal %q{[:bar, :foo]}, %q{ foo }, "[ ruby-Bugs-19304 ]" +assert_equal 'ok', %q{ + def a() end + begin + if defined?(a(1).a) + :ok + else + :ng + end + rescue + :ng + end +}, '[ruby-core:16010]' + +assert_equal 'ok', %q{ + def a() end + begin + if defined?(a::B) + :ok + else + :ng + end + rescue + :ng + end +}, '[ruby-core:16010]' + + +assert_equal 'ok', %q{ + class Module + def my_module_eval(&block) + module_eval(&block) + end + end + class String + Integer.my_module_eval do + def hoge; end + end + end + if Integer.instance_methods(false).map{|m|m.to_sym}.include?(:hoge) && + !String.instance_methods(false).map{|m|m.to_sym}.include?(:hoge) + :ok + else + :ng + end +}, "[ruby-dev:34236]" |