diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-23 01:19:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-23 01:19:43 +0000 |
commit | 15700ff0be5394e9b33111a8ef2b81bdd3ddd85f (patch) | |
tree | c56c873ac9413255e58098bf600af9d766a3dadc | |
parent | 7e162b150d5ad0e54fb392e26aaac23109f9e395 (diff) |
* include/ruby/ruby.h (USE_SYMBOL_AS_METHOD_NAME): Module#methods,
#singleton_methods and so on return Symbols. [ruby-talk:328775]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | README.EXT | 5 | ||||
-rw-r--r-- | README.EXT.ja | 6 | ||||
-rw-r--r-- | include/ruby/ruby.h | 3 |
4 files changed, 19 insertions, 0 deletions
@@ -1,3 +1,8 @@ +Mon Feb 23 10:19:41 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * include/ruby/ruby.h (USE_SYMBOL_AS_METHOD_NAME): Module#methods, + #singleton_methods and so on return Symbols. [ruby-talk:328775] + Mon Feb 23 10:15:35 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * README.EXT, README.EXT.ja: added macros for the Compatibilities. diff --git a/README.EXT b/README.EXT index 17467477ce..6844947fc9 100644 --- a/README.EXT +++ b/README.EXT @@ -1276,6 +1276,11 @@ have_func("rb_reg_new_str", "ruby.h"). Means that type rb_io_t is provided. + USE_SYMBOL_AS_METHOD_NAME + +Means that Symbols will be returned as method names, e.g., +Module#methods, #singleton_methods and so on. + Appendix C. Functions Available in extconf.rb diff --git a/README.EXT.ja b/README.EXT.ja index 71ac60e6ac..42f35249c0 100644 --- a/README.EXT.ja +++ b/README.EXT.ja @@ -1376,6 +1376,12 @@ HAVE_RB_IO_T rb_io_t 型が提供されていることを意味する. +USE_SYMBOL_AS_METHOD_NAME + + メソッド名を返すメソッド,Module#methods, #singleton_methods + などがSymbolを返すことを意味する. + + Appendix C. extconf.rbで使える関数たち extconf.rbの中では利用可能なコンパイル条件チェックの関数は以 diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 1dcff00a6a..4f28b9d698 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -286,6 +286,9 @@ VALUE rb_ull2inum(unsigned LONG_LONG); #define ID2SYM(x) (((VALUE)(x)<<RUBY_SPECIAL_SHIFT)|SYMBOL_FLAG) #define SYM2ID(x) RSHIFT((unsigned long)x,RUBY_SPECIAL_SHIFT) +/* Module#methods, #singleton_methods and so on return Symbols */ +#define USE_SYMBOL_AS_METHOD_NAME 1 + /* special constants - i.e. non-zero and non-fixnum constants */ enum ruby_special_consts { RUBY_Qfalse = 0, |