[macruby-changes] [2071] MacRuby/branches/experimental/ext/readline/readline.c
source_changes at macosforge.org
source_changes at macosforge.org
Fri Jul 24 14:23:15 PDT 2009
Revision: 2071
http://trac.macosforge.org/projects/ruby/changeset/2071
Author: pthomson at apple.com
Date: 2009-07-24 14:23:15 -0700 (Fri, 24 Jul 2009)
Log Message:
-----------
Okay, here's a better solution for that ugly hack earlier.
Modified Paths:
--------------
MacRuby/branches/experimental/ext/readline/readline.c
Modified: MacRuby/branches/experimental/ext/readline/readline.c
===================================================================
--- MacRuby/branches/experimental/ext/readline/readline.c 2009-07-24 21:23:14 UTC (rev 2070)
+++ MacRuby/branches/experimental/ext/readline/readline.c 2009-07-24 21:23:15 UTC (rev 2071)
@@ -799,17 +799,16 @@
rb_objc_define_method(*(VALUE *)history, "empty?", hist_empty_p, 0);
rb_objc_define_method(*(VALUE *)history, "delete_at", hist_delete_at, 1);
rb_define_const(mReadline, "HISTORY", history);
-#if 0
- fcomp = rb_obj_alloc(rb_cObject);
- rb_objc_define_method(fcomp, "call",
+
+ fcomp = rb_singleton_class_clone(rb_obj_alloc(rb_cObject));
+ rb_objc_define_method(*(VALUE *)fcomp, "call",
filename_completion_proc_call, 1);
rb_define_const(mReadline, "FILENAME_COMPLETION_PROC", fcomp);
- ucomp = rb_obj_alloc(rb_cObject);
- rb_objc_define_method(ucomp, "call",
+ ucomp = rb_singleton_class_clone(rb_obj_alloc(rb_cObject));
+ rb_objc_define_method(*(VALUE *)ucomp, "call",
username_completion_proc_call, 1);
rb_define_const(mReadline, "USERNAME_COMPLETION_PROC", ucomp);
-#endif
#if defined HAVE_RL_LIBRARY_VERSION
rb_define_const(mReadline, "VERSION", rb_str_new2(rl_library_version));
#else
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090724/99379d2a/attachment.html>
More information about the macruby-changes
mailing list