X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FInboxWritable.pm;h=ce979ea2bf8c65fe2f5f72ce16ef5d58515b5762;hb=b5ddcb3352ef31aeb03b4c4cbb04af3de34a4c4f;hp=5b2aeed34a1647fbf408800f7e34e12f87f47661;hpb=227a1d886672767e37cc86a3432952c14eb8a143;p=public-inbox.git
diff --git a/lib/PublicInbox/InboxWritable.pm b/lib/PublicInbox/InboxWritable.pm
index 5b2aeed3..ce979ea2 100644
--- a/lib/PublicInbox/InboxWritable.pm
+++ b/lib/PublicInbox/InboxWritable.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2019 all contributors
+# Copyright (C) 2018-2020 all contributors
# License: AGPL-3.0+
# 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