3f012a
diff --git a/Changes b/Changes
3f012a
index b55b49f..dca6a52 100644
3f012a
--- a/Changes
3f012a
+++ b/Changes
3f012a
@@ -1,4 +1,12 @@
3f012a
 
3f012a
+version 1.40; 2016-03-10
3f012a
+  * Get arg_string.t to compile in perl v5.6
3f012a
+  * Add information for how to contribute to Carp.
3f012a
+
3f012a
+version 1.39; 2016-03-06
3f012a
+  * bugfix: longmess() should return the error in scalar context
3f012a
+  (CPANRT#107225)
3f012a
+
3f012a
 version 1.38; 2015-11-06
3f012a
   * stable release of changes since v1.36
3f012a
 
3f012a
diff --git a/lib/Carp.pm b/lib/Carp.pm
3f012a
index 9421c74..92f8866 100644
3f012a
--- a/lib/Carp.pm
3f012a
+++ b/lib/Carp.pm
3f012a
@@ -87,7 +87,7 @@ BEGIN {
3f012a
     }
3f012a
 }
3f012a
 
3f012a
-our $VERSION = '1.38';
3f012a
+our $VERSION = '1.40';
3f012a
 $VERSION =~ tr/_//d;
3f012a
 
3f012a
 our $MaxEvalLen = 0;
3f012a
@@ -445,7 +445,9 @@ sub long_error_loc {
3f012a
 }
3f012a
 
3f012a
 sub longmess_heavy {
3f012a
-    return @_ if ref( $_[0] );    # don't break references as exceptions
3f012a
+    if ( ref( $_[0] ) ) {   # don't break references as exceptions
3f012a
+        return wantarray ? @_ : $_[0];
3f012a
+    }
3f012a
     my $i = long_error_loc();
3f012a
     return ret_backtrace( $i, @_ );
3f012a
 }
3f012a
@@ -906,6 +908,12 @@ call die() or warn(), as appropriate.
3f012a
 L<Carp::Always>,
3f012a
 L<Carp::Clan>
3f012a
 
3f012a
+=head1 CONTRIBUTING
3f012a
+
3f012a
+L<Carp> is maintained by the perl 5 porters as part of the core perl 5
3f012a
+version control repository. Please see the L<perlhack> perldoc for how to
3f012a
+submit patches and contribute to it.
3f012a
+
3f012a
 =head1 AUTHOR
3f012a
 
3f012a
 The Carp module first appeared in Larry Wall's perl 5.000 distribution.
3f012a
diff --git a/lib/Carp/Heavy.pm b/lib/Carp/Heavy.pm
3f012a
index 91a42d1..b05d758 100644
3f012a
--- a/lib/Carp/Heavy.pm
3f012a
+++ b/lib/Carp/Heavy.pm
3f012a
@@ -2,7 +2,7 @@ package Carp::Heavy;
3f012a
 
3f012a
 use Carp ();
3f012a
 
3f012a
-our $VERSION = '1.38';
3f012a
+our $VERSION = '1.40';
3f012a
 $VERSION =~ tr/_//d;
3f012a
 
3f012a
 # Carp::Heavy was merged into Carp in version 1.12.  Any mismatched versions
3f012a
diff --git a/t/Carp.t b/t/Carp.t
3f012a
index a18e3b4..9ecdf88 100644
3f012a
--- a/t/Carp.t
3f012a
+++ b/t/Carp.t
3f012a
@@ -3,7 +3,7 @@ no warnings "once";
3f012a
 use Config;
3f012a
 
3f012a
 use IPC::Open3 1.0103 qw(open3);
3f012a
-use Test::More tests => 65;
3f012a
+use Test::More tests => 66;
3f012a
 
3f012a
 sub runperl {
3f012a
     my(%args) = @_;
3f012a
@@ -39,6 +39,24 @@ BEGIN {
3f012a
   );
3f012a
 }
3f012a
 
3f012a
+package MyClass;
3f012a
+
3f012a
+sub new { return bless +{ field => ['value1', 'SecondVal'] }; }
3f012a
+
3f012a
+package main;
3f012a
+
3f012a
+{
3f012a
+    my $err = Carp::longmess(MyClass->new);
3f012a
+
3f012a
+    # See:
3f012a
+    # https://rt.cpan.org/Public/Bug/Display.html?id=107225
3f012a
+    is_deeply(
3f012a
+        $err->{field},
3f012a
+        ['value1', 'SecondVal',],
3f012a
+        "longmess returns sth meaningful in scalar context when passed a ref.",
3f012a
+    );
3f012a
+}
3f012a
+
3f012a
 {
3f012a
     local $SIG{__WARN__} = sub {
3f012a
         like $_[0], qr/ok (\d+)\n at.+\b(?i:carp\.t) line \d+\.$/, 'ok 2\n';
3f012a
diff --git a/t/arg_string.t b/t/arg_string.t
3f012a
index 42b43b1..dbd2e6e 100644
3f012a
--- a/t/arg_string.t
3f012a
+++ b/t/arg_string.t
3f012a
@@ -15,7 +15,7 @@ my $e9 = sprintf "%02x", (($] ge 5.007_003)
3f012a
                           : ((ord("A") == 193)
3f012a
                              ? 0x51
3f012a
                              : 0xE9));
3f012a
-my $chr_e9 = chr utf8::unicode_to_native(0xe9);
3f012a
+my $chr_e9 = chr eval "0x$e9";
3f012a
 my $nl_as_hex = sprintf "%x", ord("\n");
3f012a
 
3f012a
 like lm(3), qr/main::lm\(3\)/;