[macruby-changes] [2197] MacRuby/branches/experimental/test_vm/module.rb

source_changes at macosforge.org source_changes at macosforge.org
Mon Aug 3 16:40:05 PDT 2009


Revision: 2197
          http://trac.macosforge.org/projects/ruby/changeset/2197
Author:   mattaimonetti at gmail.com
Date:     2009-08-03 16:40:02 -0700 (Mon, 03 Aug 2009)
Log Message:
-----------
added a module assertion to the test_vm suite

Modified Paths:
--------------
    MacRuby/branches/experimental/test_vm/module.rb

Modified: MacRuby/branches/experimental/test_vm/module.rb
===================================================================
--- MacRuby/branches/experimental/test_vm/module.rb	2009-08-03 23:09:34 UTC (rev 2196)
+++ MacRuby/branches/experimental/test_vm/module.rb	2009-08-03 23:40:02 UTC (rev 2197)
@@ -2,4 +2,24 @@
 assert "Module", "module M; end; p M.class"
 
 assert "42", "x = module Foo; 42; end; p x"
-assert "nil", "x = module Foo; end; p x"
+assert "nil", "x = module Foo; end; p x" 
+
+assert '"hello world"', %{
+  module A; end
+
+  module B
+    def greetings
+      'hello'
+    end
+  end     
+
+  module C
+    def greetings
+      super + ' world'
+    end
+  end  
+
+  A.extend(B)
+  A.extend(C)
+  p A.greetings
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090803/22c2c7ff/attachment-0001.html>


More information about the macruby-changes mailing list