develooper Front page | perl.cvs.parrot | Postings from December 2008

[svn:parrot] r34682 - trunk/languages/perl6/src/builtins

From:
pmichaud
Date:
December 30, 2008 18:00
Subject:
[svn:parrot] r34682 - trunk/languages/perl6/src/builtins
Message ID:
20081231020040.58962CB9FA@x12.develooper.com
Author: pmichaud
Date: Tue Dec 30 18:00:39 2008
New Revision: 34682

Modified:
   trunk/languages/perl6/src/builtins/control.pir

Log:
[rakudo]:  eval() returns Nil for void expressions (RT #61868, lathos++)


Modified: trunk/languages/perl6/src/builtins/control.pir
==============================================================================
--- trunk/languages/perl6/src/builtins/control.pir	(original)
+++ trunk/languages/perl6/src/builtins/control.pir	Tue Dec 30 18:00:39 2008
@@ -312,19 +312,21 @@
     invokable = compiler.'compile'(code)
 
     res = invokable()
-    pop_eh
     exception = new 'Failure'
     goto done
 
   catch:
     .get_results (exception)
-    goto done
 
   done:
+    pop_eh
     # Propagate exception to caller
     $P0 = getinterp
     $P0 = $P0['lexpad';1]
     $P0['$!'] = exception
+    unless null res goto with_res
+    res = new ['Nil']
+  with_res: 
     .return (res)
 .end
 



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