Skip to content

Commit

Permalink
Remove deep_copy hack (SSHKit no longer needs it)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbrictson committed May 6, 2015
1 parent 658f880 commit 66271b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## Next release

* Your contribution here!
* Fix `Marshal.dump` warnings by removing `deep_copy` workaround that it is no longer needed for the latest SSHKit ([#10](https://github.com/mattbrictson/airbrussh/issues/10)).

## 0.4.0 (2015-05-03)

Expand Down
8 changes: 2 additions & 6 deletions lib/airbrussh/formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def write_log_file_delimiter

def write(obj)
# SSHKit's :pretty formatter mutates the stdout and stderr data in the
# command obj. So we need to clone it to ensure our copy is unscathed.
@log_file_formatter << deep_copy(obj)
# command obj. So we need to dup it to ensure our copy is unscathed.
@log_file_formatter << obj.dup

case obj
when SSHKit::Command then write_command(obj)
Expand Down Expand Up @@ -225,9 +225,5 @@ def clock
def config
Airbrussh.configuration
end

def deep_copy(obj)
Marshal.load(Marshal.dump(obj))
end
end
end

0 comments on commit 66271b1

Please sign in to comment.