summaryrefslogtreecommitdiff
path: root/test/-ext-/st
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-07 05:52:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-07 05:52:15 +0000
commitcf1a22fdf914f96126f5a8b671dab9a69db236f8 (patch)
treef29f4544c0b908746734dc336209fe13c7850d89 /test/-ext-/st
parentaf01b0fb07af13238cf4a881853d3f8c8787649e (diff)
* 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/-ext-/st')
-rw-r--r--test/-ext-/st/test_numhash.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/-ext-/st/test_numhash.rb b/test/-ext-/st/test_numhash.rb
index 9ec072e..c092049 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