mirror of
https://github.com/ruby/ruby.git
synced 2025-08-28 15:36:16 +02:00
test/ruby/test_continuation.rb: remove duplicated test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
611e287498
commit
7ce9ab664d
2 changed files with 10 additions and 18 deletions
14
parse.y
14
parse.y
|
@ -7162,11 +7162,17 @@ parser_yylex(struct parser_params *parser)
|
||||||
if (tokadd_mbchar(c) == -1) return 0;
|
if (tokadd_mbchar(c) == -1) return 0;
|
||||||
c = nextc();
|
c = nextc();
|
||||||
} while (parser_is_identchar());
|
} while (parser_is_identchar());
|
||||||
if ((c == '!' || c == '?') && !peek('=')) {
|
switch (tok()[0]) {
|
||||||
tokadd(c);
|
case '@': case '$':
|
||||||
}
|
|
||||||
else {
|
|
||||||
pushback(c);
|
pushback(c);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if ((c == '!' || c == '?') && !peek('=')) {
|
||||||
|
tokadd(c);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
pushback(c);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
tokfix();
|
tokfix();
|
||||||
|
|
||||||
|
|
|
@ -51,19 +51,5 @@ class TestContinuation < Test::Unit::TestCase
|
||||||
c.call
|
c.call
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_sort
|
|
||||||
assert_normal_exit(<<-'End')
|
|
||||||
require 'continuation'
|
|
||||||
n = 1000
|
|
||||||
ary = (1..100).to_a
|
|
||||||
ary.sort! {|a,b|
|
|
||||||
callcc {|k| $k = k } if !defined? $k
|
|
||||||
a <=> b
|
|
||||||
}
|
|
||||||
n -= 1
|
|
||||||
$k.call if 0 < n
|
|
||||||
End
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue