[macruby-changes] [3411] MacRuby/trunk/test_vm/hash.rb

source_changes at macosforge.org source_changes at macosforge.org
Tue Feb 2 07:26:52 PST 2010


Revision: 3411
          http://trac.macosforge.org/projects/ruby/changeset/3411
Author:   eloy.de.enige at gmail.com
Date:     2010-02-02 07:26:50 -0800 (Tue, 02 Feb 2010)
Log Message:
-----------
Add test_vm test which shows that including a module into Hash causes breakage.

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

Modified: MacRuby/trunk/test_vm/hash.rb
===================================================================
--- MacRuby/trunk/test_vm/hash.rb	2010-02-02 05:31:53 UTC (rev 3410)
+++ MacRuby/trunk/test_vm/hash.rb	2010-02-02 15:26:50 UTC (rev 3411)
@@ -1 +1,8 @@
-assert "lettuce\nbacon", '{:main_ingredient => "lettuce", :total => "bacon"}.each { |_,v| puts v }'
\ No newline at end of file
+assert "lettuce\nbacon", '{:main_ingredient => "lettuce", :total => "bacon"}.each { |_,v| puts v }'
+
+assert "42", %{
+  module H; end
+  class Hash; include H; end
+  d = NSDictionary.dictionaryWithDictionary('answer' => 42)
+  p d['answer']
+}
\ No newline at end of file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100202/3d05009e/attachment.html>


More information about the macruby-changes mailing list