[macruby-changes] [4573] MacRuby/trunk/vm.cpp
source_changes at macosforge.org
source_changes at macosforge.org
Mon Oct 4 16:09:53 PDT 2010
Revision: 4573
http://trac.macosforge.org/projects/ruby/changeset/4573
Author: lsansonetti at apple.com
Date: 2010-10-04 16:09:52 -0700 (Mon, 04 Oct 2010)
Log Message:
-----------
fix a bug in #define_method when passed an objc-style selector
Modified Paths:
--------------
MacRuby/trunk/vm.cpp
Modified: MacRuby/trunk/vm.cpp
===================================================================
--- MacRuby/trunk/vm.cpp 2010-10-04 22:47:47 UTC (rev 4572)
+++ MacRuby/trunk/vm.cpp 2010-10-04 23:09:52 UTC (rev 4573)
@@ -2625,7 +2625,7 @@
SEL sel;
const int arity = rb_vm_arity_n(block->arity);
const char *mid_name = rb_id2name(mid);
- if (arity > 0) {
+ if (arity > 0 && mid_name[strlen(mid_name) - 1] != ':') {
char buf[100];
snprintf(buf, sizeof buf, "%s:", mid_name);
sel = sel_registerName(buf);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20101004/38fc5228/attachment.html>
More information about the macruby-changes
mailing list