develooper Front page | perl.cvs.parrot | Postings from January 2009

[svn:parrot] r35420 - trunk/languages/perl6/src/classes

From:
pmichaud
Date:
January 11, 2009 08:33
Subject:
[svn:parrot] r35420 - trunk/languages/perl6/src/classes
Message ID:
20090111163314.ADC15CB9F9@x12.develooper.com
Author: pmichaud
Date: Sun Jan 11 08:33:13 2009
New Revision: 35420

Modified:
   trunk/languages/perl6/src/classes/Whatever.pir

Log:
[rakudo]:  Make Whatever more graceful outside of slices (RT #62066).


Modified: trunk/languages/perl6/src/classes/Whatever.pir
==============================================================================
--- trunk/languages/perl6/src/classes/Whatever.pir	(original)
+++ trunk/languages/perl6/src/classes/Whatever.pir	Sun Jan 11 08:33:13 2009
@@ -32,12 +32,18 @@
 
 .sub '' :vtable('get_integer') :method
     $P0 = get_global '$!slice'
+    unless null $P0 goto have_whatever
+    $P0 = 'undef'()
+  have_whatever:
     $I0 = $P0
     .return ($I0)
 .end
 
 .sub '' :vtable('get_number') :method
     $P0 = get_global '$!slice'
+    unless null $P0 goto have_whatever
+    $P0 = 'undef'()
+  have_whatever:
     $N0 = $P0
     .return ($N0)
 .end



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About