diff options
author | aycabta <aycabta@gmail.com> | 2019-11-20 08:39:43 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-11-20 08:39:43 +0900 |
commit | 49b4507fd3caed356e4039da5820a7c843c6b05a (patch) | |
tree | 8067ff15f464c2026c3d82a9440ddb926acbddb6 /lib | |
parent | bc0da8e3ff409f09888ffe98e6e66b503ebc8083 (diff) | |
download | bundler-49b4507fd3caed356e4039da5820a7c843c6b05a.tar.gz |
Number sign comment (# bla bla) is a kind of newline character
Diffstat (limited to 'lib')
-rw-r--r-- | lib/irb/ruby-lex.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index 58a3e1e264..81024ea5bd 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -332,7 +332,7 @@ class RubyLex depth_difference = 0 @tokens.each_with_index do |t, index| case t[1] - when :on_ignored_nl, :on_nl + when :on_ignored_nl, :on_nl, :on_comment if index != (@tokens.size - 1) depth_difference = 0 end @@ -381,7 +381,7 @@ class RubyLex @tokens.each_with_index do |t, index| corresponding_token_depth = nil case t[1] - when :on_ignored_nl, :on_nl + when :on_ignored_nl, :on_nl, :on_comment spaces_at_line_head = 0 is_first_spaces_of_line = true is_first_printable_of_line = true |