diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-05-22 14:10:11 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-05-22 14:10:11 +0900 |
| commit | ccaf3e35aaaadbe31a85c6be080a5ca01797bcff (patch) | |
| tree | 88b96c99b138aba051d771ecdae9f63922681d4a /test | |
| parent | 267eb74abc721522a89dcfbfa74c7a8163c70956 (diff) | |
| parent | 0bd8e48773b2fe16a57f444979d7824f706d08ba (diff) | |
| download | mruby-ccaf3e35aaaadbe31a85c6be080a5ca01797bcff.tar.gz mruby-ccaf3e35aaaadbe31a85c6be080a5ca01797bcff.zip | |
Merge pull request #2303 from ksss/module-initialize
Module#initialize set created object for block argument
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/module.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/t/module.rb b/test/t/module.rb index 806824b70..fcf46fe3a 100644 --- a/test/t/module.rb +++ b/test/t/module.rb @@ -344,6 +344,9 @@ assert('Module#initialize', '15.2.2.4.31') do assert_kind_of Module, Module.new mod = Module.new { def hello; "hello"; end } assert_equal [:hello], mod.instance_methods + a = nil + mod = Module.new { |m| a = m } + assert_equal mod, a end assert('Module#instance_methods', '15.2.2.4.33') do |
