From feba2b66ff076afac8a7533e45b43364ab2531d7 Mon Sep 17 00:00:00 2001 From: Yudai Takada Date: Mon, 23 Dec 2024 02:25:37 +0900 Subject: [PATCH] [ruby/reline] Fix typos in comment (https://github.com/ruby/reline/pull/796) * s/Calcualte/Calculate/ * s/unneccesary/unnecessary/ https://github.com/ruby/reline/commit/db86bcd2bf --- lib/reline/line_editor.rb | 2 +- lib/reline/unicode.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/reline/line_editor.rb b/lib/reline/line_editor.rb index 69ce7f574c..e308fbe193 100644 --- a/lib/reline/line_editor.rb +++ b/lib/reline/line_editor.rb @@ -1188,7 +1188,7 @@ class Reline::LineEditor quote_characters = Reline.completer_quote_characters before = current_line.byteslice(0, @byte_pointer).grapheme_clusters quote = nil - # Calcualte closing quote when cursor is at the end of the line + # Calculate closing quote when cursor is at the end of the line if current_line.bytesize == @byte_pointer && !quote_characters.empty? escaped = false before.each do |c| diff --git a/lib/reline/unicode.rb b/lib/reline/unicode.rb index ab7708a5fe..5ccd288da3 100644 --- a/lib/reline/unicode.rb +++ b/lib/reline/unicode.rb @@ -61,7 +61,7 @@ class Reline::Unicode # This code is essentially doing the same thing as # `str.encode(utf8, **replace_options).encode(encoding, **replace_options)` - # but also avoids unneccesary irreversible encoding conversion. + # but also avoids unnecessary irreversible encoding conversion. converted.gsub(/\X/) do |c| c.encode(Encoding::UTF_8) c