diff options
| author | take_cheeze <[email protected]> | 2014-05-28 23:21:13 +0900 |
|---|---|---|
| committer | take_cheeze <[email protected]> | 2014-05-28 23:21:13 +0900 |
| commit | 32bfa1f15c008628f93c017c7e6e07eb4b3cdeed (patch) | |
| tree | 11f4c799ea256b9b3853f56fcc4db4e5cfd3800e /mrbgems/mruby-struct/test/struct.rb | |
| parent | 7bc4d08f71950f673d788653c50703263edb61df (diff) | |
| download | mruby-32bfa1f15c008628f93c017c7e6e07eb4b3cdeed.tar.gz mruby-32bfa1f15c008628f93c017c7e6e07eb4b3cdeed.zip | |
Add invalid key type check in `Struct#[]=`.
Diffstat (limited to 'mrbgems/mruby-struct/test/struct.rb')
| -rw-r--r-- | mrbgems/mruby-struct/test/struct.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mrbgems/mruby-struct/test/struct.rb b/mrbgems/mruby-struct/test/struct.rb index 1e83ec6b3..f4151c493 100644 --- a/mrbgems/mruby-struct/test/struct.rb +++ b/mrbgems/mruby-struct/test/struct.rb @@ -41,6 +41,7 @@ assert('Struct#[]=', '15.2.18.4.3') do cc[:m1] == 3 cc["m2"] = 3 assert_equal 3, cc["m2"] + assert_raise(TypeError) { cc[[]] = 3 } end assert('Struct#each', '15.2.18.4.4') do |
