1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/id.c
matz 1eee78b876 * eval.c (rb_f_send): allow send/__send__ to call methods of all
visibility again.  we no longer provide __send, __send!.

* eval.c (rb_invoke_method): new method to honor private
  visibility.  if it's invoked in a function call style, it calls
  private methods as well (previous 1.9 send behavior).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-11-04 20:36:20 +00:00

66 lines
1.6 KiB
C

/**********************************************************************
id.c -
$Author$
$Date$
created at: Thu Jul 12 04:37:51 2007
Copyright (C) 2004-2006 Koichi Sasada
**********************************************************************/
#include "ruby/ruby.h"
#define extern
#include "id.h"
#undef extern
void
Init_id(void)
{
/* Symbols */
symIFUNC = ID2SYM(rb_intern("<IFUNC>"));
symCFUNC = ID2SYM(rb_intern("<CFUNC>"));
/* IDs */
idPLUS = rb_intern("+");
idMINUS = rb_intern("-");
idMULT = rb_intern("*");
idDIV = rb_intern("/");
idMOD = rb_intern("%");
idLT = rb_intern("<");
idLTLT = rb_intern("<<");
idLE = rb_intern("<=");
idGT = rb_intern(">");
idGE = rb_intern(">=");
idEq = rb_intern("==");
idEqq = rb_intern("===");
idBackquote = rb_intern("`");
idEqTilde = rb_intern("=~");
idAREF = rb_intern("[]");
idASET = rb_intern("[]=");
idEach = rb_intern("each");
idTimes = rb_intern("times");
idLength = rb_intern("length");
idLambda = rb_intern("lambda");
idIntern = rb_intern("intern");
idGets = rb_intern("gets");
idSucc = rb_intern("succ");
idEnd = rb_intern("end");
idRangeEachLT = rb_intern("Range#each#LT");
idRangeEachLE = rb_intern("Range#each#LE");
idArrayEach = rb_intern("Array#each");
idMethodMissing = rb_intern("method_missing");
idThrowState = rb_intern("#__ThrowState__");
idBitblt = rb_intern("bitblt");
idAnswer = rb_intern("the_answer_to_life_the_universe_and_everything");
idSend = rb_intern("send");
idSendBang = rb_intern("send!");
id__send__ = rb_intern("__send__");
}