diff options
author | Schneems <richard.schneeman+foo@gmail.com> | 2023-12-04 16:17:19 -0600 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2023-12-04 22:18:40 +0000 |
commit | 13482ab1e61e0c337badd6308412621f807df9c1 (patch) | |
tree | 274b4222aad75f93f9d3cd2776bb3fbf2e90c44b /spec | |
parent | 81a700853d1d3bdf7973c7d7175711e7e8c508c7 (diff) | |
download | ruby-13482ab1e61e0c337badd6308412621f807df9c1.tar.gz |
[ruby/syntax_suggest] Update standardrb to Ruby 3.0 standards
https://github.com/ruby/syntax_suggest/commit/2771dcabe0
Diffstat (limited to 'spec')
-rw-r--r-- | spec/syntax_suggest/unit/capture_code_context_spec.rb | 4 | ||||
-rw-r--r-- | spec/syntax_suggest/unit/clean_document_spec.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/syntax_suggest/unit/capture_code_context_spec.rb b/spec/syntax_suggest/unit/capture_code_context_spec.rb index 46f13e8961..0e70f1f1e2 100644 --- a/spec/syntax_suggest/unit/capture_code_context_spec.rb +++ b/spec/syntax_suggest/unit/capture_code_context_spec.rb @@ -94,7 +94,7 @@ module SyntaxSuggest code_lines = CleanDocument.new(source: source).call.lines code_lines[0..75].each(&:mark_invisible) - code_lines[77..-1].each(&:mark_invisible) + code_lines[77..].each(&:mark_invisible) expect(code_lines.join.strip).to eq("class Lookups") block = CodeBlock.new(lines: code_lines[76..149]) @@ -123,7 +123,7 @@ module SyntaxSuggest code_lines = CleanDocument.new(source: source).call.lines block = CodeBlock.new(lines: code_lines) - code_lines[1..-1].each(&:mark_invisible) + code_lines[1..].each(&:mark_invisible) expect(block.to_s.strip).to eq("class Dog") diff --git a/spec/syntax_suggest/unit/clean_document_spec.rb b/spec/syntax_suggest/unit/clean_document_spec.rb index 25a62e4454..d6ba8f0d47 100644 --- a/spec/syntax_suggest/unit/clean_document_spec.rb +++ b/spec/syntax_suggest/unit/clean_document_spec.rb @@ -85,7 +85,7 @@ module SyntaxSuggest code_lines = doc.lines expect(code_lines[0].to_s.count($/)).to eq(5) - code_lines[1..-1].each do |line| + code_lines[1..].each do |line| expect(line.to_s.strip.length).to eq(0) end end |