summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Ziegler <austin@zieglers.ca>2021-12-23 11:02:38 -0500
committerAustin Ziegler <austin@zieglers.ca>2022-07-04 20:26:10 -0400
commit5da19290c4b33f579f3b176192b7b15c151bdd00 (patch)
tree350582ea634e538b3727376132ebe69c8688b466
parent22303f04b44d97455b5c862176d2d93c02a2b2ba (diff)
downloaddiff-lcs-5da19290c4b33f579f3b176192b7b15c151bdd00.tar.gz
Fix :yields: directive for rdoc
-rw-r--r--lib/diff/lcs.rb10
-rw-r--r--lib/diff/lcs/callbacks.rb4
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/diff/lcs.rb b/lib/diff/lcs.rb
index bd0147e..db2b03d 100644
--- a/lib/diff/lcs.rb
+++ b/lib/diff/lcs.rb
@@ -67,7 +67,7 @@ module Diff::LCS # rubocop:disable Style/Documentation
# identically for key purposes. That is:
#
# O.new('a').eql?(O.new('a')) == true
- def lcs(other, &block) #:yields self[i] if there are matched subsequences:
+ def lcs(other, &block) #:yields: self[i] if there are matched subsequences
Diff::LCS.lcs(self, other, &block)
end
@@ -141,7 +141,7 @@ module Diff::LCS # rubocop:disable Style/Documentation
end
class << Diff::LCS
- def lcs(seq1, seq2, &block) #:yields seq1[i] for each matched:
+ def lcs(seq1, seq2, &block) #:yields: seq1[i] for each matched
matches = Diff::LCS::Internals.lcs(seq1, seq2)
ret = []
string = seq1.kind_of? String
@@ -165,7 +165,7 @@ class << Diff::LCS
# Class argument is provided for +callbacks+, #diff will attempt to
# initialise it. If the +callbacks+ object (possibly initialised) responds to
# #finish, it will be called.
- def diff(seq1, seq2, callbacks = nil, &block) # :yields diff changes:
+ def diff(seq1, seq2, callbacks = nil, &block) # :yields: diff changes
diff_traversal(:diff, seq1, seq2, callbacks || Diff::LCS::DiffCallbacks, &block)
end
@@ -197,7 +197,7 @@ class << Diff::LCS
# # insert
# end
# end
- def sdiff(seq1, seq2, callbacks = nil, &block) #:yields diff changes:
+ def sdiff(seq1, seq2, callbacks = nil, &block) #:yields: diff changes
diff_traversal(:sdiff, seq1, seq2, callbacks || Diff::LCS::SDiffCallbacks, &block)
end
@@ -282,7 +282,7 @@ class << Diff::LCS
# <tt>callbacks#discard_b</tt> will be called after the end of the sequence
# is reached, if +a+ has not yet reached the end of +A+ or +b+ has not yet
# reached the end of +B+.
- def traverse_sequences(seq1, seq2, callbacks = Diff::LCS::SequenceCallbacks) #:yields change events:
+ def traverse_sequences(seq1, seq2, callbacks = Diff::LCS::SequenceCallbacks) #:yields: change events
callbacks ||= Diff::LCS::SequenceCallbacks
matches = Diff::LCS::Internals.lcs(seq1, seq2)
diff --git a/lib/diff/lcs/callbacks.rb b/lib/diff/lcs/callbacks.rb
index c075327..54b3686 100644
--- a/lib/diff/lcs/callbacks.rb
+++ b/lib/diff/lcs/callbacks.rb
@@ -107,7 +107,7 @@ class Diff::LCS::DiffCallbacks
# Returns the difference set collected during the diff process.
attr_reader :diffs
- def initialize # :yields self:
+ def initialize # :yields: self
@hunk = []
@diffs = []
@@ -302,7 +302,7 @@ class Diff::LCS::SDiffCallbacks
# Returns the difference set collected during the diff process.
attr_reader :diffs
- def initialize #:yields self:
+ def initialize #:yields: self
@diffs = []
yield self if block_given?
end