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 | 71f8ca8bc4131a1c3e638a3af7842f4176f1adc2 (patch) | |
tree | 0531ac314ac47c182a4c4aa0108194ebebc868e3 /sample | |
parent | 453f64fa477686e6a1accade80d27480a372d948 (diff) | |
download | ruby-71f8ca8bc4131a1c3e638a3af7842f4176f1adc2.tar.gz |
* parse.y (assoc_list): remove expanded hash literal (no splat).
* lib/webrick/httpstatus.rb (WEBrick::HTTPStatus::EOFError): adapt
to new syntax.
git-svn-id: svn+ssh://ci.ruby-lang.org/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 18c914d5b3..bda0d1837c 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 |