[macruby-changes] [2398] MacRuby/trunk/test_vm/eval.rb
source_changes at macosforge.org
source_changes at macosforge.org
Thu Aug 27 12:53:27 PDT 2009
Revision: 2398
http://trac.macosforge.org/projects/ruby/changeset/2398
Author: mattaimonetti at gmail.com
Date: 2009-08-27 12:53:27 -0700 (Thu, 27 Aug 2009)
Log Message:
-----------
added class_eval failing spec
Modified Paths:
--------------
MacRuby/trunk/test_vm/eval.rb
Modified: MacRuby/trunk/test_vm/eval.rb
===================================================================
--- MacRuby/trunk/test_vm/eval.rb 2009-08-27 07:48:56 UTC (rev 2397)
+++ MacRuby/trunk/test_vm/eval.rb 2009-08-27 19:53:27 UTC (rev 2398)
@@ -79,6 +79,18 @@
A::B.new.foo do p X end
}
+assert '42', %{
+ class A; end
+ A.class_eval %{
+ def foo
+ baz = {}
+ bar = baz[:foo] = 42
+ bar
+ end
+ }
+ p A.new.foo
+}
+
assert '42', 'a = nil; 1.times { a = 42; eval "p a" }'
assert 'main', "p eval('self')"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090827/a7ece8df/attachment.html>
More information about the macruby-changes
mailing list