summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/version.pm2
-rw-r--r--lib/version.t11
-rw-r--r--util.c4
3 files changed, 14 insertions, 3 deletions
diff --git a/lib/version.pm b/lib/version.pm
index 7a3f14b2f5..f05d20a399 100644
--- a/lib/version.pm
+++ b/lib/version.pm
@@ -6,7 +6,7 @@ use strict;
use vars qw(@ISA $VERSION $CLASS *qv);
-$VERSION = 0.73;
+$VERSION = 0.74;
$CLASS = 'version';
diff --git a/lib/version.t b/lib/version.t
index 9d0554c71a..a839d5d6c3 100644
--- a/lib/version.t
+++ b/lib/version.t
@@ -5,6 +5,7 @@
#########################
use Test::More qw(no_plan);
+use Data::Dumper;
require Test::Harness;
no warnings 'once';
*Verbose = \$Test::Harness::Verbose;
@@ -541,6 +542,16 @@ SKIP: {
like($warning, qr/Integer overflow in version/, "Too large version");
}
+ {
+ # http://rt.cpan.org/Public/Bug/Display.html?id=30004
+ my $v1 = $CLASS->new("v0.1_1");
+ (my $alpha1 = Dumper($v1)) =~ s/.+'alpha' => ([^,]+),.+/$1/ms;
+ my $v2 = $CLASS->new($v1);
+ (my $alpha2 = Dumper($v2)) =~ s/.+'alpha' => ([^,]+),.+/$1/ms;
+ is $alpha2, $alpha1, "Don't fall for Data::Dumper's tricks";
+ }
+
+
}
1;
diff --git a/util.c b/util.c
index f75e5a79e2..670c823867 100644
--- a/util.c
+++ b/util.c
@@ -4395,10 +4395,10 @@ Perl_new_version(pTHX_ SV *ver)
/* Begin copying all of the elements */
if ( hv_exists((HV *)ver, "qv", 2) )
- (void)hv_stores((HV *)hv, "qv", &PL_sv_yes);
+ (void)hv_stores((HV *)hv, "qv", newSViv(1));
if ( hv_exists((HV *)ver, "alpha", 5) )
- (void)hv_stores((HV *)hv, "alpha", &PL_sv_yes);
+ (void)hv_stores((HV *)hv, "alpha", newSViv(1));
if ( hv_exists((HV*)ver, "width", 5 ) )
{