Revision
3211
Author
lsansonetti@apple.com
Date
2010-01-07 22:19:50 -0800 (Thu, 07 Jan 2010)

Log Message

fixed a bug in the #send method inliner where protected methods would not be callable

Modified Paths

Diff

Modified: MacRuby/trunk/compiler.cpp (3210 => 3211)


--- MacRuby/trunk/compiler.cpp	2010-01-08 06:19:13 UTC (rev 3210)
+++ MacRuby/trunk/compiler.cpp	2010-01-08 06:19:50 UTC (rev 3211)
@@ -2616,7 +2616,8 @@
 	bb = thenBB;
 	std::vector<Value *> new_params;
 	new_params.push_back(compile_mcache(new_sel, false));
-	new_params.push_back(params[1]);
+	// Compile a null top reference, to ignore protected visibility.
+	new_params.push_back(ConstantInt::get(RubyObjTy, 0));
 	new_params.push_back(params[2]);
 	new_params.push_back(compile_sel(new_sel));
 	new_params.push_back(params[4]);