diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-07 05:52:15 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-02-07 05:52:15 +0000 |
commit | cf1a22fdf914f96126f5a8b671dab9a69db236f8 (patch) | |
tree | f29f4544c0b908746734dc336209fe13c7850d89 /test | |
parent | af01b0fb07af13238cf4a881853d3f8c8787649e (diff) | |
download | ruby-cf1a22fdf914f96126f5a8b671dab9a69db236f8.tar.gz |
* st.c (st_update): table can be unpacked in the callback.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/-ext-/st/test_numhash.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/-ext-/st/test_numhash.rb b/test/-ext-/st/test_numhash.rb index 9ec072e1a5..c092049bf9 100644 --- a/test/-ext-/st/test_numhash.rb +++ b/test/-ext-/st/test_numhash.rb @@ -17,5 +17,11 @@ class Bug::StNumHash end assert_equal([*0..5], keys) end + + def test_update + assert_equal(true, @tbl.update(0) {@tbl[5] = :x}) + assert_equal(:x, @tbl[0]) + assert_equal(:x, @tbl[5]) + end end end |