diff options
author | manga_osyo <manga.osyo@gmail.com> | 2021-11-23 23:07:02 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-12-03 00:42:28 +0900 |
commit | dcbe29d2aefa5304af443e13a156c80850f47ea5 (patch) | |
tree | 0704ab8f353cb0a4a91b815c00bff0f93f60f84f /lib | |
parent | 4d4716d939ad8cb288a503e97c73ed8cfbc12348 (diff) |
[ruby/irb] Fix bug infinite loop when pasting multilines fo code in Ruby 2.6
Fix bug infinite loop when pasting multilines fo code in Ruby 2.6.
This is not reproduced in Ruby 2.7.
Changes added in https://github.com/ruby/irb/pull/242/files#diff-612b926e42ed78aed1a889ac1944f7d22229b3a489cc08f837a7f75eca3d3399R155 are also reflected in Ruby 2.6.
https://github.com/ruby/irb/commit/0a77f75bf0
Diffstat (limited to 'lib')
-rw-r--r-- | lib/irb/ruby-lex.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index f5361e16a2..751d6ec526 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -167,7 +167,7 @@ class RubyLex end end else - tokens = lexer.parse + tokens = lexer.parse.reject { |it| it.pos.first == 0 } end end tokens |