[macruby-changes] [3159] MacRuby/trunk/test_vm/eval.rb

source_changes at macosforge.org source_changes at macosforge.org
Tue Dec 22 20:00:42 PST 2009


Revision: 3159
          http://trac.macosforge.org/projects/ruby/changeset/3159
Author:   vincent.isambart at gmail.com
Date:     2009-12-22 20:00:41 -0800 (Tue, 22 Dec 2009)
Log Message:
-----------
Fixed a few 1.9 test_vm tests

Modified Paths:
--------------
    MacRuby/trunk/test_vm/eval.rb

Modified: MacRuby/trunk/test_vm/eval.rb
===================================================================
--- MacRuby/trunk/test_vm/eval.rb	2009-12-23 03:30:08 UTC (rev 3158)
+++ MacRuby/trunk/test_vm/eval.rb	2009-12-23 04:00:41 UTC (rev 3159)
@@ -59,24 +59,32 @@
 assert ":ok", "module M; module_eval 'p :ok'; end"
 assert ":ok", "module M; module_eval 'def self.foo; :ok; end'; end; p M.foo"
 
-assert '42', %{
+assert ':ok', %{
   $b = proc do p X end
   module A
-   X = 42
-   module_eval &$b
+    X = :ko
+    begin
+      module_eval &$b
+    rescue NameError
+      p :ok
+    end
   end
 }
 
-assert '42', %{
+assert ':ok', %{
   module A
-    X = 42
+    X = :ko
     class B
       def foo(&b)
         (class << self; self; end).module_eval &b
       end
     end
   end
-  A::B.new.foo do p X end
+  begin
+    A::B.new.foo do p X end
+  rescue NameError
+    p :ok
+  end
 }
 
 assert '42', %{
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091222/dec9156d/attachment.html>


More information about the macruby-changes mailing list