]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/InboxWritable.pm
index: support --compact / -c on command-line
[public-inbox.git] / lib / PublicInbox / InboxWritable.pm
index 5b2aeed34a1647fbf408800f7e34e12f87f47661..ce979ea2bf8c65fe2f5f72ce16ef5d58515b5762 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2018-2020 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 
 # Extends read-only Inbox for writing
@@ -19,6 +19,7 @@ use constant {
 
 sub new {
        my ($class, $ibx, $creat_opt) = @_;
+       return $ibx if ref($ibx) eq $class;
        my $self = bless $ibx, $class;
 
        # TODO: maybe stop supporting this