diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-29 03:11:24 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-09-29 03:11:24 +0000 |
commit | 235a2f90430944f733c2a8ffae8e9eab37d0584c (patch) | |
tree | 0a827fd6eb09f270cdd45105a4d6adb9e2bcf617 | |
parent | 6ce526c1fb74c032150c1cf99cc01fec6c489047 (diff) | |
download | ruby-235a2f90430944f733c2a8ffae8e9eab37d0584c.tar.gz ruby-235a2f90430944f733c2a8ffae8e9eab37d0584c.tar.xz ruby-235a2f90430944f733c2a8ffae8e9eab37d0584c.zip |
add test for a define_method wrapper.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@13564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | bootstraptest/test_knownbug.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bootstraptest/test_knownbug.rb b/bootstraptest/test_knownbug.rb index 259ebc21f..2bfdc1194 100644 --- a/bootstraptest/test_knownbug.rb +++ b/bootstraptest/test_knownbug.rb @@ -13,3 +13,18 @@ assert_finish 1, %q{ w.write "a" }, '[ruby-dev:31866]' +assert_equal 'ok', %q{ + class Module + def define_method2(name, &block) + define_method(name, &block) + end + end + class C + define_method2(:m) {|x, y| :fail } + end + begin + C.new.m([1,2]) + rescue ArgumentError + :ok + end +} |