From f7a08c6afc9c3014c5c8770128cf53d8b2dc913b Mon Sep 17 00:00:00 2001 From: Patrick Linnane Date: Thu, 15 Feb 2024 21:34:59 -0800 Subject: [PATCH] various: fix miscellaneous typos Signed-off-by: Patrick Linnane --- Contributing.md | 3 ++- History.md | 3 +++ lib/diff/lcs.rb | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Contributing.md b/Contributing.md index fdf0f9a..611cffc 100644 --- a/Contributing.md +++ b/Contributing.md @@ -41,7 +41,7 @@ will permit you to do: $ bundle install ``` -to get the development dependencies. If you aleady have `hoe` installed, you +to get the development dependencies. If you already have `hoe` installed, you can accomplish the same thing with: ```sh @@ -106,6 +106,7 @@ Thanks to everyone else who has contributed code or bug reports to Diff::LCS: - Myron Marston - Nicolas Leger - Oleg Orlov +- Patrick Linnane - Paul Kunysch - Pete Higgins - Peter Goldstein diff --git a/History.md b/History.md index 89a9b36..92bfe60 100644 --- a/History.md +++ b/History.md @@ -2,6 +2,8 @@ ## NEXT / YYYY-MM-DD +- Patrick Linnane fixed various minor typos. [#93][] + - Mark Young added a Changelog link to the RubyGems metadata. [#92][] ## 1.5.1 / 2024-01-31 @@ -427,6 +429,7 @@ [#90]: https://github.com/halostatue/diff-lcs/pull/90 [#91]: https://github.com/halostatue/diff-lcs/issues/91 [#92]: https://github.com/halostatue/diff-lcs/pull/92 +[#93]: https://github.com/halostatue/diff-lcs/pull/93 [rspec/rspec-expectations#200]: https://github.com/rspec/rspec-expectations/pull/200 [rspec/rspec-expectations#219]: https://github.com/rspec/rspec-expectations/issues/219 [rspec/rspec-expectations#238]: https://github.com/rspec/rspec-expectations/issues/238 diff --git a/lib/diff/lcs.rb b/lib/diff/lcs.rb index 302fcd3..bdf0805 100644 --- a/lib/diff/lcs.rb +++ b/lib/diff/lcs.rb @@ -256,7 +256,7 @@ def sdiff(seq1, seq2, callbacks = nil, &block) # :yields: diff changes # # The methods for callbacks#match, callbacks#discard_a, and # callbacks#discard_b are invoked with an event comprising the - # action ("=", "+", or "-", respectively), the indicies +i+ and +j+, and the + # action ("=", "+", or "-", respectively), the indexes +i+ and +j+, and the # elements A[i] and B[j]. Return values are discarded by # #traverse_sequences. # @@ -465,7 +465,7 @@ def traverse_sequences(seq1, seq2, callbacks = Diff::LCS::SequenceCallbacks) # : # The methods for callbacks#match, callbacks#discard_a, # callbacks#discard_b, and callbacks#change are invoked # with an event comprising the action ("=", "+", "-", or "!", respectively), - # the indicies +i+ and +j+, and the elements A[i] and B[j]. + # the indexes +i+ and +j+, and the elements A[i] and B[j]. # Return values are discarded by #traverse_balanced. # # === Context @@ -482,7 +482,7 @@ def traverse_balanced(seq1, seq2, callbacks = Diff::LCS::BalancedCallbacks) # Process all the lines in the match vector. loop do - # Find next match indices +ma+ and +mb+ + # Find next match indexes +ma+ and +mb+ loop do ma += 1 break unless ma < matches.size && matches[ma].nil?