summaryrefslogtreecommitdiff
path: root/test/irb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-20 11:07:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-20 11:07:02 +0000
commitf14f0d34641ece73d77781856eed70de760f9d9f (patch)
tree365baa7371d35c633c88f27fccdff162fd08cc9b /test/irb
parent716ce65138a8faf2e1226eafe42b2ffb39ebfd67 (diff)
ruby-lex.rb: fix continued line conditions
* lib/irb/ruby-lex.rb (RubyLex#lex): fix conditions for continued line; empty lines, a semicolon, first line in `begin` block, just after `else` are not continued. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/irb')
-rw-r--r--test/irb/test_ruby-lex.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/irb/test_ruby-lex.rb b/test/irb/test_ruby-lex.rb
index 7e4d486b8d..b07b4a2eb6 100644
--- a/test/irb/test_ruby-lex.rb
+++ b/test/irb/test_ruby-lex.rb
@@ -55,15 +55,15 @@ module TestIRB
src, lineno = "#{<<-"begin;"}#{<<~'end;'}", __LINE__+1
begin;
# #;# LTYPE:INDENT:CONTINUE
- x #;# -:0:- # FIXME: a comment should not `continue'
+ x #;# -:0:-
x( #;# -:0:-
) #;# -:1:*
a \ #;# -:0:-
#;# -:0:*
a; #;# -:0:-
- a #;# -:0:- # FIXME: a semicolon should not `continue'
+ a #;# -:0:-
#;# -:0:-
- a #;# -:0:- # FIXME: an empty line should not `continue'
+ a #;# -:0:-
a = #;# -:0:-
' #;# -:0:*
' #;# ':0:*
@@ -73,11 +73,11 @@ module TestIRB
" #;# -:1:-
" #;# ":1:-
begin #;# -:1:-
- a #;# -:2:- # FIXME: the first line should not be `continue'd
+ a #;# -:2:-
a #;# -:2:-
end #;# -:2:-
else #;# -:1:-
- nil #;# -:1:- # FIXME: just after `else' should not be `continue'd
+ nil #;# -:1:-
end #;# -:1:-
end;
top_level_statement(src.gsub(/[ \t]*#;#.*/, ''))