diff options
author | tomoya ishida <tomoyapenguin@gmail.com> | 2023-08-12 03:51:21 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-08-11 18:51:25 +0000 |
commit | d42891079f6eac5e086c246b0a937ab44fa11823 (patch) | |
tree | 9cd9d3030f78aec8fc93cc49c0890e6874b1fa1b /lib | |
parent | 0781e55206d94079c15ab315fc082f49bf8bf780 (diff) | |
download | ruby-d42891079f6eac5e086c246b0a937ab44fa11823.tar.gz |
[ruby/irb] Remove needless removal of trailing whitespace in
check_code_state
(https://github.com/ruby/irb/pull/678)
https://github.com/ruby/irb/commit/4a6af7d1ed
Diffstat (limited to 'lib')
-rw-r--r-- | lib/irb/ruby-lex.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/irb/ruby-lex.rb b/lib/irb/ruby-lex.rb index d436f98244..92e993ecef 100644 --- a/lib/irb/ruby-lex.rb +++ b/lib/irb/ruby-lex.rb @@ -213,8 +213,7 @@ class RubyLex end def check_code_state(code) - check_target_code = code.gsub(/\s*\z/, '').concat("\n") - tokens = self.class.ripper_lex_without_warning(check_target_code, context: @context) + tokens = self.class.ripper_lex_without_warning(code, context: @context) opens = IRB::NestingParser.open_tokens(tokens) [tokens, opens, code_terminated?(code, tokens, opens)] end |