Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix a bug where converting a NULL pointer as an opaque type value to …

…Ruby would not give nil (as in RubyCocoa)

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@5278 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
commit dd2226768f4ea60762b783f450f8300ec27acbee 1 parent 3d910b4
Laurent Sansonetti authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  compiler.cpp
3  compiler.cpp
View
@@ -5749,6 +5749,9 @@ extern "C"
VALUE
rb_vm_new_opaque(VALUE klass, void *val)
{
+ if (val == NULL) {
+ return Qnil;
+ }
return Data_Wrap_Struct(klass, NULL, NULL, val);
}
Please sign in to comment.
Something went wrong with that request. Please try again.