summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-08 06:59:38 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-08 06:59:38 +0000
commit705f30f169bb44cc4b4954361caf17699c3557d1 (patch)
tree0339b1544f7ca84e52cb4905dda3a6ca947e8b5a
parentaa94d2839d4784956d1291216c908b4d68cb4d0b (diff)
downloadruby-705f30f169bb44cc4b4954361caf17699c3557d1.tar.gz
ruby-705f30f169bb44cc4b4954361caf17699c3557d1.tar.xz
ruby-705f30f169bb44cc4b4954361caf17699c3557d1.zip
test/ruby/test_continuation.rb: remove duplicated test.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--parse.y14
-rw-r--r--test/ruby/test_continuation.rb14
2 files changed, 10 insertions, 18 deletions
diff --git a/parse.y b/parse.y
index 657eafbad..bda57f428 100644
--- a/parse.y
+++ b/parse.y
@@ -7162,11 +7162,17 @@ parser_yylex(struct parser_params *parser)
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();
diff --git a/test/ruby/test_continuation.rb b/test/ruby/test_continuation.rb
index 272599650..09787c158 100644
--- a/test/ruby/test_continuation.rb
+++ b/test/ruby/test_continuation.rb
@@ -51,19 +51,5 @@ class TestContinuation < Test::Unit::TestCase
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