From cf1a22fdf914f96126f5a8b671dab9a69db236f8 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 7 Feb 2012 05:52:15 +0000 Subject: * 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 --- test/-ext-/st/test_numhash.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/-ext-/st') 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 -- cgit v1.2.3