[MacRuby] #973: EventMachine fails to build.
#973: EventMachine fails to build. -----------------------------+---------------------------------------------- Reporter: rob@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- '''Problem''' [[BR]] EventMachine fails to build on MacRuby 0.7 and MacRuby-latest. I have tried building from the EventMachine GitHub repository(master branch), and the latest stable EventMachine release, which is 0.12.10. The build fails with the exact same error message across MacRuby and EventMachine versions. '''To Reproduce''' [[BR]] macgem install eventmachine '''Output''' [[BR]] https://gist.github.com/b17dce053aeb963848b5.txt -- Ticket URL: <http://www.macruby.org/trac/ticket/973> MacRuby <http://macruby.org/>
#973: EventMachine fails to build. -----------------------------+---------------------------------------------- Reporter: rob@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- Comment(by watson1978@…): I atach a patch: {{{ #!diff diff --git a/NSArray.m b/NSArray.m index 837ec43..d514bd8 100644 --- a/NSArray.m +++ b/NSArray.m @@ -1313,7 +1313,7 @@ rb_ary_entry(VALUE ary, long offset) } VALUE -rb_ary_aref(VALUE ary, SEL sel, int argc, VALUE *argv) +rb_ary_aref(int argc, VALUE *argv, VALUE ary) { if (IS_RARY(ary)) { return rary_aref(ary, 0, argc, argv); diff --git a/include/ruby/intern.h b/include/ruby/intern.h index d8b3940..2fdbfa9 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -49,6 +49,7 @@ VALUE rb_ary_new3(long,...); VALUE rb_ary_new4(long, const VALUE *); void rb_ary_free(VALUE); VALUE rb_ary_freeze(VALUE); +VALUE rb_ary_aref(int, VALUE *, VALUE); VALUE rb_ary_subseq(VALUE, long, long); void rb_ary_store(VALUE, long, VALUE); VALUE rb_ary_dup(VALUE); diff --git a/include/ruby/macruby.h b/include/ruby/macruby.h index b7de5f7..e72ad38 100644 --- a/include/ruby/macruby.h +++ b/include/ruby/macruby.h @@ -77,9 +77,6 @@ rb_objc_release(void *addr) bool rb_objc_hash_is_pure(VALUE); bool rb_objc_str_is_pure(VALUE); bool rb_objc_ary_is_pure(VALUE); -long rb_ary_len(VALUE); -VALUE rb_ary_elt(VALUE, long); -VALUE rb_ary_aref(VALUE ary, SEL sel, int argc, VALUE *argv); VALUE rb_objc_create_class(const char *name, VALUE super); void rb_objc_class_sync_version(Class klass, Class super_class); diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index d26c532..34b203e 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -527,6 +527,8 @@ long rb_str_clen(VALUE); #define RSTRING_LEN(str) (rb_str_clen((VALUE)str)) #define RSTRING_END(str) (RSTRING_PTR(str)+RSTRING_LEN(str)) +long rb_ary_len(VALUE); +VALUE rb_ary_elt(VALUE, long); #define RARRAY_LEN(a) (rb_ary_len((VALUE)a)) #define RARRAY_AT(a,i) (rb_ary_elt((VALUE)a, (long)i)) /* IMPORTANT: try to avoid using RARRAY_PTR if necessary, because it's diff --git a/re.c b/re.c index f00ef80..afbed36 100644 --- a/re.c +++ b/re.c @@ -1707,7 +1707,7 @@ match_aref(VALUE rcv, SEL sel, int argc, VALUE *argv) } } } - return rb_ary_aref(match_to_a(rcv, 0), 0, argc, argv); + return rb_ary_aref(argc, argv, match_to_a(rcv, 0)); } /* }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/973#comment:1> MacRuby <http://macruby.org/>
#973: EventMachine fails to build. -----------------------------+---------------------------------------------- Reporter: rob@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: -----------------------------+---------------------------------------------- Comment(by lsansonetti@…): Thanks, please go ahead and commit :) -- Ticket URL: <http://www.macruby.org/trac/ticket/973#comment:2> MacRuby <http://macruby.org/>
#973: EventMachine fails to build. -----------------------------+---------------------------------------------- Reporter: rob@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | -----------------------------+---------------------------------------------- Changes (by watson1978@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.8 Comment: Thank you for checking my patch :-) Fixed with r4832. -- Ticket URL: <http://www.macruby.org/trac/ticket/973#comment:3> MacRuby <http://macruby.org/>
#973: EventMachine fails to build. -----------------------------+---------------------------------------------- Reporter: rob@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.8 Component: MacRuby | Resolution: fixed Keywords: | -----------------------------+---------------------------------------------- Comment(by rob@…): Thanks! -- Ticket URL: <http://www.macruby.org/trac/ticket/973#comment:4> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby