[macruby-changes] [4811] MacRuby/trunk/test_vm/class.rb
source_changes at macosforge.org
source_changes at macosforge.org
Thu Oct 21 18:51:07 PDT 2010
Revision: 4811
http://trac.macosforge.org/projects/ruby/changeset/4811
Author: lsansonetti at apple.com
Date: 2010-10-21 18:51:05 -0700 (Thu, 21 Oct 2010)
Log Message:
-----------
add reduction for #962
Modified Paths:
--------------
MacRuby/trunk/test_vm/class.rb
Modified: MacRuby/trunk/test_vm/class.rb
===================================================================
--- MacRuby/trunk/test_vm/class.rb 2010-10-20 22:24:06 UTC (rev 4810)
+++ MacRuby/trunk/test_vm/class.rb 2010-10-22 01:51:05 UTC (rev 4811)
@@ -38,6 +38,20 @@
p X.new.foo
}
+assert "42", %{
+ class Module
+ m = method(:method_added)
+ define_method(:method_added) do |name|
+ p 42 if name == :test
+ m.call(name)
+ end
+ end
+
+ class Foo
+ def test; end
+ end
+}
+
assert "true", %{
class X
define_singleton_method(:foo, method(:constants))
@@ -176,4 +190,4 @@
end
end
class Y < X; end
-}
\ No newline at end of file
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101021/f22dded0/attachment.html>
More information about the macruby-changes
mailing list