summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2024-10-18 11:12:25 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2024-10-21 08:41:50 -0700
commitc4b6ce36758fbc8d851b8b6563d0cf64cf2417db (patch)
treedf534aad052c9959ad27a9830de0c707e514ec1b
parent494fcc507b3bc218beb6638d33476b647d55969e (diff)
Merge syntax-suggest-2.0.1
-rw-r--r--lib/syntax_suggest/around_block_scan.rb4
-rw-r--r--lib/syntax_suggest/block_expand.rb2
-rw-r--r--lib/syntax_suggest/capture_code_context.rb2
-rw-r--r--lib/syntax_suggest/clean_document.rb2
-rw-r--r--lib/syntax_suggest/lex_value.rb2
-rw-r--r--lib/syntax_suggest/parse_blocks_from_indent_line.rb2
-rw-r--r--lib/syntax_suggest/version.rb2
-rwxr-xr-xlibexec/syntax_suggest2
-rw-r--r--spec/syntax_suggest/unit/block_expand_spec.rb4
-rw-r--r--spec/syntax_suggest/unit/clean_document_spec.rb6
10 files changed, 14 insertions, 14 deletions
diff --git a/lib/syntax_suggest/around_block_scan.rb b/lib/syntax_suggest/around_block_scan.rb
index ce00431b3a..dd9af729c5 100644
--- a/lib/syntax_suggest/around_block_scan.rb
+++ b/lib/syntax_suggest/around_block_scan.rb
@@ -118,7 +118,7 @@ module SyntaxSuggest
end
# Scanning is intentionally conservative because
- # we have no way of rolling back an agressive block (at this time)
+ # we have no way of rolling back an aggressive block (at this time)
#
# If a block was stopped for some trivial reason, (like an empty line)
# but the next line would have caused it to be balanced then we
@@ -224,7 +224,7 @@ module SyntaxSuggest
@scanner.lines
end
- # Managable rspec errors
+ # Manageable rspec errors
def inspect
"#<#{self.class}:0x0000123843lol >"
end
diff --git a/lib/syntax_suggest/block_expand.rb b/lib/syntax_suggest/block_expand.rb
index e9b486c720..2751ae2a64 100644
--- a/lib/syntax_suggest/block_expand.rb
+++ b/lib/syntax_suggest/block_expand.rb
@@ -157,7 +157,7 @@ module SyntaxSuggest
end
end
- # Managable rspec errors
+ # Manageable rspec errors
def inspect
"#<SyntaxSuggest::CodeBlock:0x0000123843lol >"
end
diff --git a/lib/syntax_suggest/capture_code_context.rb b/lib/syntax_suggest/capture_code_context.rb
index 6dc7047176..1f232cfae3 100644
--- a/lib/syntax_suggest/capture_code_context.rb
+++ b/lib/syntax_suggest/capture_code_context.rb
@@ -26,7 +26,7 @@ module SyntaxSuggest
# they can't add extra data that's not present.
#
# In the case of known ambiguious cases, this class adds context
- # back to the ambiguitiy so the programmer has full information.
+ # back to the ambiguity so the programmer has full information.
#
# Beyond handling these ambiguities, it also captures surrounding
# code context information:
diff --git a/lib/syntax_suggest/clean_document.rb b/lib/syntax_suggest/clean_document.rb
index 0847a62e27..2790ccae86 100644
--- a/lib/syntax_suggest/clean_document.rb
+++ b/lib/syntax_suggest/clean_document.rb
@@ -267,7 +267,7 @@ module SyntaxSuggest
groups.each do |lines|
line = lines.first
- # Handle the case of multiple groups in a a row
+ # Handle the case of multiple groups in a row
# if one is already replaced, move on
next if @document[line.index].empty?
diff --git a/lib/syntax_suggest/lex_value.rb b/lib/syntax_suggest/lex_value.rb
index 008cc105b5..b46a332772 100644
--- a/lib/syntax_suggest/lex_value.rb
+++ b/lib/syntax_suggest/lex_value.rb
@@ -28,7 +28,7 @@ module SyntaxSuggest
@is_end = false
@is_kw = false
return if type != :on_kw
- #
+
return if last_lex && last_lex.fname? # https://github.com/ruby/ruby/commit/776759e300e4659bb7468e2b97c8c2d4359a2953
case token
diff --git a/lib/syntax_suggest/parse_blocks_from_indent_line.rb b/lib/syntax_suggest/parse_blocks_from_indent_line.rb
index 241ed6acb4..39dfca55d2 100644
--- a/lib/syntax_suggest/parse_blocks_from_indent_line.rb
+++ b/lib/syntax_suggest/parse_blocks_from_indent_line.rb
@@ -8,7 +8,7 @@ module SyntaxSuggest
# grabbing one that contains only an "end". In this example:
#
# def dog
- # begonn # mispelled `begin`
+ # begonn # misspelled `begin`
# puts "bark"
# end
# end
diff --git a/lib/syntax_suggest/version.rb b/lib/syntax_suggest/version.rb
index 4320adb218..d5eff2a17a 100644
--- a/lib/syntax_suggest/version.rb
+++ b/lib/syntax_suggest/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
module SyntaxSuggest
- VERSION = "2.0.0"
+ VERSION = "2.0.1"
end
diff --git a/libexec/syntax_suggest b/libexec/syntax_suggest
index e4a0b0b658..3dc8eb94d1 100755
--- a/libexec/syntax_suggest
+++ b/libexec/syntax_suggest
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-require_relative "../lib/syntax_suggest/api"
+require "syntax_suggest/api"
SyntaxSuggest::Cli.new(
argv: ARGV
diff --git a/spec/syntax_suggest/unit/block_expand_spec.rb b/spec/syntax_suggest/unit/block_expand_spec.rb
index 5cff73621d..fde0360775 100644
--- a/spec/syntax_suggest/unit/block_expand_spec.rb
+++ b/spec/syntax_suggest/unit/block_expand_spec.rb
@@ -146,7 +146,7 @@ module SyntaxSuggest
EOM
end
- it "expand until next boundry (indentation)" do
+ it "expand until next boundary (indentation)" do
source_string = <<~EOM
describe "what" do
Foo.call
@@ -188,7 +188,7 @@ module SyntaxSuggest
EOM
end
- it "expand until next boundry (empty lines)" do
+ it "expand until next boundary (empty lines)" do
source_string = <<~EOM
describe "what" do
end
diff --git a/spec/syntax_suggest/unit/clean_document_spec.rb b/spec/syntax_suggest/unit/clean_document_spec.rb
index c531c199b1..5b5ca04cfd 100644
--- a/spec/syntax_suggest/unit/clean_document_spec.rb
+++ b/spec/syntax_suggest/unit/clean_document_spec.rb
@@ -139,7 +139,7 @@ module SyntaxSuggest
source = <<~'EOM'
context "timezones workaround" do
it "should receive a time in UTC format and return the time with the"\
- "office's UTC offset substracted from it" do
+ "office's UTC offset subtracted from it" do
travel_to DateTime.new(2020, 10, 1, 10, 0, 0) do
office = build(:office)
end
@@ -155,7 +155,7 @@ module SyntaxSuggest
).to eq(<<~'EOM'.indent(2))
1 context "timezones workaround" do
2 it "should receive a time in UTC format and return the time with the"\
- 3 "office's UTC offset substracted from it" do
+ 3 "office's UTC offset subtracted from it" do
4 travel_to DateTime.new(2020, 10, 1, 10, 0, 0) do
5 office = build(:office)
6 end
@@ -171,7 +171,7 @@ module SyntaxSuggest
).to eq(<<~'EOM')
1 context "timezones workaround" do
> 2 it "should receive a time in UTC format and return the time with the"\
- > 3 "office's UTC offset substracted from it" do
+ > 3 "office's UTC offset subtracted from it" do
4 travel_to DateTime.new(2020, 10, 1, 10, 0, 0) do
5 office = build(:office)
6 end