Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add #to_ary to Diff::LCS::Change and Diff::LCS::ContextChange #47

Merged
merged 2 commits into from Jan 26, 2019
Merged

Commits on Jan 24, 2019

  1. Add #to_ary to Diff::LCS::Change and Diff::LCS::ContextChange

    It would be quite handy if you could write as follows:
    
    ```ruby
    Diff::LCS.sdiff(a, b).each do |action, (old_position, old_element), (new_position, new_element)|
      case action
      when '!'
        # replace
      when '-'
        # delete
      when '+'
        # insert
      end
    end
    ```
    knu committed Jan 24, 2019
    Copy the full SHA
    89906cf View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2019

  1. Copy the full SHA
    48d9ac9 View commit details
    Browse the repository at this point in the history