[macruby-changes] [2021] MacRuby/branches/experimental/variable.c
source_changes at macosforge.org
source_changes at macosforge.org
Mon Jul 13 16:22:27 PDT 2009
Revision: 2021
http://trac.macosforge.org/projects/ruby/changeset/2021
Author: lsansonetti at apple.com
Date: 2009-07-13 16:22:26 -0700 (Mon, 13 Jul 2009)
Log Message:
-----------
make sure we never return Qundef...
Modified Paths:
--------------
MacRuby/branches/experimental/variable.c
Modified: MacRuby/branches/experimental/variable.c
===================================================================
--- MacRuby/branches/experimental/variable.c 2009-07-12 06:01:06 UTC (rev 2020)
+++ MacRuby/branches/experimental/variable.c 2009-07-13 23:22:26 UTC (rev 2021)
@@ -1020,7 +1020,10 @@
const int slot = rb_vm_find_class_ivar_slot(CLASS_OF(obj), id);
if (slot != -1) {
- return rb_vm_get_ivar_from_slot(obj, slot);
+ val = rb_vm_get_ivar_from_slot(obj, slot);
+ if (val != Qundef) {
+ return val;
+ }
}
switch (TYPE(obj)) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090713/aa81adc5/attachment.html>
More information about the macruby-changes
mailing list