Skip to content

Commit

Permalink
Fix typos in comment (#796)
Browse files Browse the repository at this point in the history
* s/Calcualte/Calculate/

* s/unneccesary/unnecessary/
  • Loading branch information
ydah authored Dec 22, 2024
1 parent e0850cd commit db86bcd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/reline/line_editor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ def retrieve_completion_block
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|
Expand Down
2 changes: 1 addition & 1 deletion lib/reline/unicode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def self.safe_encode(str, encoding)

# 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
Expand Down

0 comments on commit db86bcd

Please sign in to comment.