[macruby-changes] [1647] MacRuby/branches/experimental/test_vm/class.rb
source_changes at macosforge.org
source_changes at macosforge.org
Sat May 30 08:30:07 PDT 2009
Revision: 1647
http://trac.macosforge.org/projects/ruby/changeset/1647
Author: eloy.de.enige at gmail.com
Date: 2009-05-30 08:30:07 -0700 (Sat, 30 May 2009)
Log Message:
-----------
Added failing test on calling super from a method defined with define_method.
Modified Paths:
--------------
MacRuby/branches/experimental/test_vm/class.rb
Modified: MacRuby/branches/experimental/test_vm/class.rb
===================================================================
--- MacRuby/branches/experimental/test_vm/class.rb 2009-05-30 15:29:52 UTC (rev 1646)
+++ MacRuby/branches/experimental/test_vm/class.rb 2009-05-30 15:30:07 UTC (rev 1647)
@@ -28,3 +28,17 @@
assert "42", "x = class Foo; 42; end; p x"
assert "nil", "x = class Foo; end; p x"
+
+assert "42", %q{
+ class X
+ def foo
+ 42
+ end
+ end
+ class Y < X
+ define_method(:foo) do
+ super()
+ end
+ end
+ p Y.new.foo
+}
\ No newline at end of file
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090530/2ff57718/attachment.html>
More information about the macruby-changes
mailing list