ruby-changes:4835
From: ko1@a...
Date: Thu, 8 May 2008 15:59:47 +0900 (JST)
Subject: [ruby-changes:4835] matz - Ruby:r16329 (trunk): test/ruby/test_continuation.rb: remove duplicated test.
matz 2008-05-08 15:59:38 +0900 (Thu, 08 May 2008)
New Revision: 16329
Modified files:
trunk/parse.y
trunk/test/ruby/test_continuation.rb
Log:
test/ruby/test_continuation.rb: remove duplicated test.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/parse.y?r1=16329&r2=16328&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_continuation.rb?r1=16329&r2=16328&diff_format=u
Index: parse.y
===================================================================
--- parse.y (revision 16328)
+++ parse.y (revision 16329)
@@ -7162,11 +7162,17 @@
if (tokadd_mbchar(c) == -1) return 0;
c = nextc();
} while (parser_is_identchar());
- if ((c == '!' || c == '?') && !peek('=')) {
- tokadd(c);
- }
- else {
+ switch (tok()[0]) {
+ case '@': case '$':
pushback(c);
+ break;
+ default:
+ if ((c == '!' || c == '?') && !peek('=')) {
+ tokadd(c);
+ }
+ else {
+ pushback(c);
+ }
}
tokfix();
Index: test/ruby/test_continuation.rb
===================================================================
--- test/ruby/test_continuation.rb (revision 16328)
+++ test/ruby/test_continuation.rb (revision 16329)
@@ -51,19 +51,5 @@
c.call
}
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
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/