[5278] MacRuby/trunk/compiler.cpp
Revision: 5278 http://trac.macosforge.org/projects/ruby/changeset/5278 Author: lsansonetti@apple.com Date: 2011-03-14 19:03:16 -0700 (Mon, 14 Mar 2011) Log Message: ----------- fix a bug where converting a NULL pointer as an opaque type value to Ruby would not give nil (as in RubyCocoa) Modified Paths: -------------- MacRuby/trunk/compiler.cpp Modified: MacRuby/trunk/compiler.cpp =================================================================== --- MacRuby/trunk/compiler.cpp 2011-03-14 18:50:42 UTC (rev 5277) +++ MacRuby/trunk/compiler.cpp 2011-03-15 02:03:16 UTC (rev 5278) @@ -5749,6 +5749,9 @@ VALUE rb_vm_new_opaque(VALUE klass, void *val) { + if (val == NULL) { + return Qnil; + } return Data_Wrap_Struct(klass, NULL, NULL, val); }
participants (1)
-
source_changes@macosforge.org