[MacRuby] #1337: 3 tests in test_vm became failure after commited 'c1833dd1d2764711f3ea658d7e1108e62057dddb'.
#1337: 3 tests in test_vm became failure after commited 'c1833dd1d2764711f3ea658d7e1108e62057dddb'. ------------------------------+--------------------------------------------- Reporter: kouji@… | Owner: lsansonetti@… Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: 0.11-blocker ------------------------------+--------------------------------------------- 3 tests in test_vm became failure after commited below. {{{ commit c1833dd1d2764711f3ea658d7e1108e62057dddb Author: Laurent Sansonetti <lrz@chopine.be> Date: Mon Jun 13 15:53:20 2011 -0700 some work on garbage collecting singleton classes - disabled for now since it breaks rubyspec }}} 3 tests are below. {{{ # Test cloning assert "B, [:CONST_M], [:ok]", %{ module M CONST_M = 1 def ok; end end B = M.clone puts B.to_s + ", " + B.constants.to_s + ", " + B.instance_methods(false).to_s } Result: B, [], [:ok] assert "B, [:CONST_A], [:ok]", %{ class A CONST_A = 1 def ok; end end B = A.clone puts B.to_s + ", " + B.constants.to_s + ", " + B.instance_methods(false).to_s } Result: B, [], [:ok] assert "B, [:CONST_C, :CONST_A], []", %{ class A CONST_A = 1 def ok; end end class C < A CONST_C = 1 end B = C.clone puts B.to_s + ", " + B.constants.to_s + ", " + B.instance_methods(false).to_s } Result: B, [:CONST_A], [] }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1337> MacRuby <http://macruby.org/>
#1337: 3 tests in test_vm became failure after commited 'c1833dd1d2764711f3ea658d7e1108e62057dddb'. ------------------------------+--------------------------------------------- Reporter: kouji@… | Owner: lsansonetti@… Type: defect | Status: new Priority: critical | Milestone: Component: MacRuby | Keywords: 0.11-blocker ------------------------------+--------------------------------------------- Comment(by kouji@…): This issue is fixed a patch below. However, this changes was removed in c1833dd1d2764711f3ea658d7e1108e62057dddb (see https://github.com/MacRuby/MacRuby/commit/c1833dd1d2764711f3ea658d7e1108e620... ). Laurent, could you check this patch and apply if this patch is correct? {{{ Changes in HEAD Modified object.c diff --git a/object.c b/object.c index dc35d69..0de54a9 100644 --- a/object.c +++ b/object.c @@ -192,6 +192,13 @@ rb_obj_class(VALUE obj) static void init_copy(VALUE dest, VALUE obj) { + if (NATIVE(obj)) { + if (OBJ_TAINTED(obj)) { + OBJ_TAINT(dest); + } + goto call_init_copy; + } + if (OBJ_FROZEN(dest)) { rb_raise(rb_eTypeError, "[bug] frozen object (%s) allocated", rb_obj_classname(dest)); @@ -239,7 +246,7 @@ init_copy(VALUE dest, VALUE obj) } break; } - +call_init_copy: rb_vm_call(dest, selInitializeCopy, 1, &obj); } }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1337#comment:1> MacRuby <http://macruby.org/>
#1337: 3 tests in test_vm became failure after commited 'c1833dd1d2764711f3ea658d7e1108e62057dddb'. ------------------------------+--------------------------------------------- Reporter: kouji@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: critical | Milestone: MacRuby 0.11 Component: MacRuby | Resolution: fixed Keywords: 0.11-blocker | ------------------------------+--------------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.11 Comment: Thanks for the report. I found a cleaner way to fix the regressions than reverting to that ugly patch. Should be fixed in https://github.com/MacRuby/MacRuby/commit/97de43e5592b329c4f635fb2517524ec55... -- Ticket URL: <http://www.macruby.org/trac/ticket/1337#comment:2> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby