diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-29 06:27:49 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-29 06:27:49 +0000 |
commit | fbcacf6388bbe19970f2793aa7f42b2fc7254a9b (patch) | |
tree | 0531ac314ac47c182a4c4aa0108194ebebc868e3 /sample | |
parent | 33e12e30d0cd9c0e48692116ae4b336d0413e33a (diff) | |
download | ruby-fbcacf6388bbe19970f2793aa7f42b2fc7254a9b.tar.gz ruby-fbcacf6388bbe19970f2793aa7f42b2fc7254a9b.tar.xz ruby-fbcacf6388bbe19970f2793aa7f42b2fc7254a9b.zip |
* parse.y (assoc_list): remove expanded hash literal (no splat).
* lib/webrick/httpstatus.rb (WEBrick::HTTPStatus::EOFError): adapt
to new syntax.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r-- | sample/test.rb | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sample/test.rb b/sample/test.rb index 18c914d5b..bda0d1837 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -750,12 +750,11 @@ test_ok($x == [1,2,3,1,2,3]) test_check "hash" $x = {1=>2, 2=>4, 3=>6} -$y = {1, 2, 2, 4, 3, 6} test_ok($x[1] == 2) test_ok(begin - for k,v in $y + for k,v in $x raise if k*2 != v end true @@ -769,19 +768,19 @@ test_ok($x.has_value?(4)) test_ok($x.values_at(2,3) == [4,6]) test_ok($x == {1=>2, 2=>4, 3=>6}) -$z = $y.keys.sort.join(":") +$z = $x.keys.sort.join(":") test_ok($z == "1:2:3") -$z = $y.values.sort.join(":") +$z = $x.values.sort.join(":") test_ok($z == "2:4:6") -test_ok($x == $y) +test_ok($x == $x) -$y.shift -test_ok($y.length == 2) +$x.shift +test_ok($x.length == 2) $z = [1,2] -$y[$z] = 256 -test_ok($y[$z] == 256) +$x[$z] = 256 +test_ok($x[$z] == 256) $x = Hash.new(0) $x[1] = 1 |